I am working on finding a method to find VMs without NICs (like vCLS) and apply a tag to them. But not sure how to find that with a Get-VM.
You can filter with a Where-clause, and then use the Tag-Assignment on the VMs that pass through.
The Tag I used is just an example, you could use any tag.
$noNIc = Get-Tag -Name NoNIC
Get-VM | where{(Get-NetworkAdapter -VM $_).Count -eq 0} |
New-TagAssignment -Tag $noNIC -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can filter with a Where-clause, and then use the Tag-Assignment on the VMs that pass through.
The Tag I used is just an example, you could use any tag.
$noNIc = Get-Tag -Name NoNIC
Get-VM | where{(Get-NetworkAdapter -VM $_).Count -eq 0} |
New-TagAssignment -Tag $noNIC -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference