I am learning powershell as part of windows administration and I have a bit of a problem. I need to run sysinfo command for various systems and pick up the OS Name, OS Version , Total Physical Memory and other fields from the output. My problem is the output is not a powershell object, so I can't use property based processing. What can I do to pick up only these fields ? I tried using findstr, but for fields like Hotfix, which have multiple values, it only picks up the first line.
Command
systeminfo /S <IP Address> /U Administrator /P <Password>
Output:
Host Name: TEST
OS Name: Microsoft Windows Server 2008 R2 Standard
OS Version: 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Server
OS Build Type: Multiprocessor Free