Sure
Get-VM -Name (Get-Content -Path .\vmnames.txt)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Do you mind sharing what the command looks like if I want to pull the list of vm's from a text file ?
Sure
Get-VM -Name (Get-Content -Path .\vmnames.txt)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you so much ! With your command, this is what I put together.
To create new snapshots ...
Get-VM -Name (Get-Content -Path .\vmservers.txt) | New-Snapshot -Name "SnapshotName" -Description "Created $(Get-Date)" –RunAsync
To remove the snapshots from those same vm's ...
Get-VM -Name (Get-Content -Path .\servers.txt) | Get-Snapshot | Remove-Snapshot -confirm:$false
Nice, just watch out with the RunAsync.
Running a lot of snapshots in parallel might have a performance impact on your environment
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference