Skip to content

Instantly share code, notes, and snippets.

@shadowbq
Created July 3, 2018 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadowbq/9b08760481a112675a7eaf8ba082ab24 to your computer and use it in GitHub Desktop.
Save shadowbq/9b08760481a112675a7eaf8ba082ab24 to your computer and use it in GitHub Desktop.
Restore from VSS using PS
# VSS Location
# \\localhost\D$\@GMT-2011.09.20-06.00.04_Data\Folder\SubFolder
$source="\\localhost\D$\@GMT-2011.09.20-06.00.04_Data\Folder\SubFolder"
$dest="C:\temp\dest"
$logfile="C:\logs\VSS-restoration.log"
$what = @("/COPYALL","/MIR")
$logs = "/LOG+:$logfile"
$options = @("/R:0","/W:0","/NP",$logs)
$cmdArgs = @("$source","$dest",$what,$options)
robocopy @cmdArgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment