@echo off cd C:\_\hp_disk_monitoring\ REM Generates the array output health data and send mail if failed disks are found: Powershell.exe -executionpolicy remotesigned -File C:\_\hp_disk_monitoring\disk_monitoring.ps1 REM Mounts the SMB volume where the frontend is hosted and copies the report: net use x: \\MY_SMB_SERVER_IP\web /USER:MY_SMB_USER MY_SMB_PASSWORD xcopy C:\_\hp_disk_monitoring\log.txt x:\hprack-mon\ /Y net use x: /delete