I used to run the following script on a Windows 7 machine:
Powershell
$computer=read-host"Enter computer name:"gwmiwin32_computersystem-comp$computer|SelectUSername,Caption,ManufacturerWrite-OutputRead-Host-Prompt"Press Enter to Exit"I used it to find out which user was on which computer but it is no longer working. I have several other scripts that I took from Windows 7 and put it on a test Windows 10 machine and a lot of them aren't working. There's no longer any output. It just prompts for machine name and then press any key to exit. Any idea what I need to add for the output? I tried write-output in different places with no luck.