This runs fine from the PS command prompt:
Get-WmiObject Win32_Share -computer "Server" -filter "Name = 'ShareName'"
When added to Ruby I can get this to execute (because it doesn't need quotes):
powershell (Get-WmiObject Win32_Share -computer "Server")
but not with the filter argument (needs quotes):
powershell (Get-WmiObject Win32_Share -computer "Server" **-filter "Name = 'ShareName'"**)
The output of the error does not show the double quotes. I tried everything I know to escape them and nothing works.
tried (... -filter \"Name = 'ShareName'\")
tried %x{}
instead of ``
tried single quotes