I’m trying to write a small PowerShell script that gets the username of a person logged into a VM.
Get-HVMachineSummary -PoolName (pool) | select -ExpandProperty base | Select-Object user, name | Format-Table -Wrap | Out-File -FilePath (path)
for some reason, the “user” parameter gives me [this](https://i.imgur.com/1eQMemC.png) in the output text file. It should be the name of whoever is logged into the VM. I am just an intern at my college learning and teaching myself little bits about scripting and VMware, so I don’t have a big grasp on what I’m doing tbh. I looked up documentation and everything but cannot find anything that helps. Not sure if this is the right place to post, but I thought I would at least try! Thanks 🙂
View Reddit by MITS96 – View Source