Sep 08, 2009
I think your issue isn't with the passing in of the command but rather with how your command is formulated. When I tried to enter just the "get-wmiobject ..." directly into powershell I got the same error. The issue is with the code after the second pipe. I'd try something like this:
"Get-WMIObject -class MSFT_SPIESUserSetting | where-object { $_.PrimaryURI -eq 'sip:Navin@OCSR2.COM' } | foreach-object -process { $_.Enabled = $True; $_.put() | out-null; }"
I've put a foreach-object before your last expression block and it seems to work for me.
Let me know how it goes...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)