Gig-A-Dee
asked on
Do Windows Srvr 2008 64 bit batch files run in power shell or command prompts?
I have a Windows 2008 ENT 64bit server. There's an existing batch file that the task scheduler fires off each night. I need to see the progress of this task; can I run the batch file in powershell or just from command prompt?
Here's the Batch:
REM Hyper-V Virtual Machine Backup
REM Shutdown virtual machines
%SystemRoot%\system32\Wind owsPowerSh ell\v1.0\p owershell. exe d:\admin\Hyperv_VMBackup\s cripts\vmb ackup\Star tStopVms.p s1 d:\admin\HyperV_VMBackup\s cripts\vmb ackup\VmNa mesStop.tx t 1
REM Copy virtual machines, /Y overwrites the file if it already exists
copy /Y "D:\VM\Edge-TS1\Edge-TS1.v hd" "D:\VM\vm_backups\Edge-TS1 \Edge-TS1. vhd"
copy /Y "D:\VM\Edge-Acct\Edge-Acct .vhd" "D:\VM\vm_backups\Edge-Acc t\Edge-Acc t.vhd"
copy /Y "D:\VM\Edge-SQL\Edge-SQL.v hd" "D:\VM\vm_backups\Edge-SQL \Edge-SQL. vhd"
copy /Y "D:\VM\Edge-Helpdesk\Edge- helpdesk.v hd" "D:\VM\vm_backups\Edge-hel pdesk\Edge -helpdesk. vhd"
REM Power on virtual machines
%SystemRoot%\system32\Wind owsPowerSh ell\v1.0\p owershell. exe d:\admin\HyperV_VMBackup\s cripts\vmb ackup\Star tStopVms.p s1 d:\admin\HyperV_VMBackup\s cripts\vmb ackup\VmNa mesStart.t xt 0
pause
REM Finished!
Here's the Batch:
REM Hyper-V Virtual Machine Backup
REM Shutdown virtual machines
%SystemRoot%\system32\Wind
REM Copy virtual machines, /Y overwrites the file if it already exists
copy /Y "D:\VM\Edge-TS1\Edge-TS1.v
copy /Y "D:\VM\Edge-Acct\Edge-Acct
copy /Y "D:\VM\Edge-SQL\Edge-SQL.v
copy /Y "D:\VM\Edge-Helpdesk\Edge-
REM Power on virtual machines
%SystemRoot%\system32\Wind
pause
REM Finished!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is there a benefit running it under PowerShell?
Only benefit is that it doesn't expend extra memory to open a shell from within the command prompt shell. Other than that, it is pretty negligable.
ASKER