google-cloud-powershell
google-cloud-powershell copied to clipboard
How To enable VSS snapshots using powershell
Hi,
I have script that takes snapshot perodically and it working good. When i try to enable VSS using this reference http://googlecloudplatform.github.io/google-cloud-powershell/#/google-compute-engine/GceSnapshot/Add-GceSnapshot by adding parameter ‑GuestFlush or ‑VSS is not working. Can anyone give me an example how the VSS is working in the powershell command.
Thanks
@ihabhady, thanks for using the module. Can you provide the exact command that you use?
Thank you quoctruong for your feedback.
foreach ($Zone in $Zones) { $DisksInZone = Get-GceDisk -Project $Project -zone $Zone | foreach { $_.Name }
foreach ($Disk in $DisksInZone) {
Write-Host "=========================================="
Write-Host "$Zone "-" $Disk"
Write-Host "=========================================="
Add-GceSnapshot -project $Project -zone $Zone $Disk -VSS
}
}
I used -VSS and ‑GuestFlush but not working.
@ihabhady Do you happen to have the error message when you run the command? Also, I believe VSS snapshots work only on Windows instances with image version v20160810 and newer.