Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Revert to Current Snapshot VIA PowerCLI

$
0
0

LucD - I ran the code you provided above and this is the error message received.

Select-Object : A parameter cannot be found that matches parameter name 'VM'. At line:1 char:152 + foreach($vm in (Get-Folder -Name "TEST" |Get-vm)){$snap = Get-Snapshot -VM $v m | Sort-Object -Property Created -Descending | Select -First 1 Set-VM -VM <<<<   $vm -SnapShot $snap -Confirm:$false}     + CategoryInfo          : InvalidArgument: (:) [Select-Object], ParameterB   indingException     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Comm   ands.SelectObjectCommand Select-Object : A parameter cannot be found that matches parameter name 'VM'. At line:1 char:152 + foreach($vm in (Get-Folder -Name "TEST" |Get-vm)){$snap = Get-Snapshot -VM $v m | Sort-Object -Property Created -Descending | Select -First 1 Set-VM -VM <<<<   $vm -SnapShot $snap -Confirm:$false}     + CategoryInfo          : InvalidArgument: (:) [Select-Object], ParameterB   indingException     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Comm   ands.SelectObjectCommand


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>