I’m looking for some help to fine my attempt to write a quick PowerShell script when using PowerCLI connected to my firms VMWare cluster.
I’m looking to get a list of all Virtual Machines that are domain joined, list by GuestOS type i.e. Windows and then add a label to an existing Custom Attribute.
So far this is what i have come up with to list the VMs.
But when you are actually filtering for only VMs with the desired OS name all the VMs in the output will have the same label?!
Anyway - an easy way to add an additional property is to use a calculated property:
BTW: When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.