Ruby PowerShell Windows

When I ran the following in ruby:

`powershell.exe -executionpolicy unrestricted -command get-module -listavailable` 

... the result I get is different than if I just run cmd and execute:

 powershell.exe -executionpolicy unrestricted -command get-module -listavailable 

How can I fix this, so I can give the same result?

+4
source share
1 answer

Yes. The fix seems to be a syntax alias. Using:

C: /windows/sysnative/windowspowshell/v1.0/powershell.exe

Instead of syswow64 or system32 or none.

For more details see http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx

+2
source

Source: https://habr.com/ru/post/1441865/


All Articles