I would like to clear the description field on many VMs at a time. Since there is not current a method to properly clear the VM description field I'm just replacing the description with a "space". The command:
set-vm "name" -description " " -Confirm:$false
works just fine for one VM, however when I try the following:
set-vm -description " " -Confirm:$false
I receive the error "The specified parameter 'VM' expects a single value, but your name criteria 'src *' corresponds to multiple values"
can anyone help?
You have to tell Set-VM which "VMs" you want this to happen on.
There are 2 ways of specyfying the VMs
1) as a parameter to the Set-VM cmdlet
Set-VM MyPC -Description " " Set-VM My* -Description " "
2) you can "pipe" one or more VMs to the Set-VM cmdlet
Get-VM | Set-VM -Description " " Get-VM My* | Set-VM -Description " "
Hope this clarifies it a bit.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You have to tell Set-VM which "VMs" you want this to happen on.
There are 2 ways of specyfying the VMs
1) as a parameter to the Set-VM cmdlet
Set-VM MyPC -Description " " Set-VM My* -Description " "
2) you can "pipe" one or more VMs to the Set-VM cmdlet
Get-VM | Set-VM -Description " " Get-VM My* | Set-VM -Description " "
Hope this clarifies it a bit.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
great, thanks. I had tried the first method, however I was getting the error, the pipe method worked perfectly, thanks