Accessing Volume Shadow Copy (VSS) Snapshots from powershell

前端 未结 4 463
一向
一向 2020-12-08 02:54

I am attempting to create and access a Volume Shadow Copy snapshot using the Windows Power Shell in Windows 7. I found that I can create snapshots using the following via a

4条回答
  •  半阙折子戏
    2020-12-08 03:45

    This is because the Invoke-Expression in the New-ShadowLink returns a string. If you modify the line to:

    Invoke-Expression -Command "cmd /c mklink /d '$linkPath' '$target'" | Out-Null
    

    it will fix the problem.

提交回复
热议问题