For VMs in the Same Folder
Get-Folder "Server" | Get-VM | Sort Name | FT -Autosize
Get-Folder "Server" | Get-VM | Set-Annotation -CustomAttribute "Department" -Value "IT"
Get-Folder "Server" | Get-VM | Set-Annotation -CustomAttribute "Owner" -Value "Richard"
Get-Folder "Server" | Get-VM | Set-Annotation -CustomAttribute "Requester" -Value "Amy"
For VM Name with the Same Prefix
Get-VM "FAMSC*" | Sort Name | Select Name, PowerState, NumCpu, MemoryGB, VMHost, Folder | FT -Autosize
Get-VM "FAMSC*" | Set-Annotation -CustomAttribute "Department" -Value "IT"
Get-VM "FAMSC*" | Set-Annotation -CustomAttribute "Owner" -Value "Richard"
Get-VM "FAMSC*" | Set-Annotation -CustomAttribute "Requester" -Value "Amy"
For single VM
Get-VM "FAMSCAD01" | Set-Annotation -CustomAttribute "Department" -Value "IT"
Get-VM "FAMSCAD01" | Set-Annotation -CustomAttribute "Owner" -Value "Richard"
Get-VM "FAMSCAD01" | Set-Annotation -CustomAttribute "Requester" -Value "Amy"