Advertisement
LADOE

backup-1

Jun 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Sets execution policy to Unrestricted
  2. # Creates vhdx image of drive(s)
  3. # Saves file in $savetodriveletter
  4. # Runs disk2vhd.exe and creates .vhdx file
  5.  
  6. Set-ExecutionPolicy Unrestricted
  7.  
  8. $savetodriveletter = 'd:'
  9. $filename = (get-date -uformat %m%d%y) + "_PCNAME.vhdx"
  10.  
  11. c:\disk2vhd.exe c: $savetodriveletter\$filename | wait-job
  12.  
  13. "Script was ran. Ensure that backup is functional"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement