I've built winexe 1.1 on rhel6. I want to store output of powershell command execution in PSObject.
Currently I can get output in TEXT or XML format.
For ex, Following command returns all VMs on the host in XML format,
build/winexe-static -U <username password=""> //<server-ip> "powershell -InputFormat none -OutputFormat XML Get-VM"</server-ip></username>
And I want to store output of Get-VM in Object, so I tried,
build/winexe-static -U <username password=""> //<server-ip> "powershell -InputFormat none -OutputFormat XML $vms=Get-VM"</server-ip></username>
Then I got following error,
=Get-VM : The term '=Get-VM' is not recognized as the name of a cmdlet, function, script file, or operable program.
Is there any library in Python or C/Cpp to store PSObject?