I have a simple script that runs snapshots on a host.
Get-VM | New-Snapshot.....
how do I exclude a VM "example-vm" from this list?
You can use a Where-clause
Get-VM | Where{$_.Name -notmatch "^example-vm$"} | New-Snapshot....
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference