When running the script below
#import list of servers from text file
$Servers = Get-Content -Path “c:\VMlist.txt”
# Take snapshot of each vm
foreach($Server in $Servers){
Get-VM -Name $Server | New-Snapshot -Name "Take 2" -Description "blah blah blah" # -Quiesce -Memory
}
I recieve this error "WARNING: Parameter 'VM' is obsolete. This parameter no longer accepts multiple values."
Is there anyway around this or is thee a better way?
The message might be a bit misleading.
The VM parameter is not obsolete, only the possibility to pass multiple values (an array) on the parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The message might be a bit misleading.
The VM parameter is not obsolete, only the possibility to pass multiple values (an array) on the parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference