Hello ,
When I do a Get-VM - OSFullName it returns "Microsoft Windows Server 2003, Enterprise Edition (32-bit)"
The comma in the text is messing up my SQL bulk insert for reporting, any way to get short OS details?
Thanks
There is
Get-VM MyVM | select Name,@{N="GuestId";E={$_.Guest.GuestId}}
The list of guestids can be found in the VirtualMachineGuestOsIdentifier enumeration.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
One way of getting rid of the comma if it bothers you is
Get-VM MyVM | select Name,@{N="OSFullname";E={$_.Guest.OsFullName.Replace(',','')}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks I will try that, do you know if theres a short OS detail?
There is
Get-VM MyVM | select Name,@{N="GuestId";E={$_.Guest.GuestId}}
The list of guestids can be found in the VirtualMachineGuestOsIdentifier enumeration.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Excellent Thanks!