After installing nushell (https://www.nushell.sh/) in my windows environment, I want to use the power of nushell in conjunction with powershell.
For example, I need to invoke common powershell commands in my daily work like
> get-service *myservice -computername remote | restart-service
But how to invoke such command (with pipeline) from nu shell?
Do I need to start nu shell from powershell or vica versa? Also the invocation with the ^ sign seems to not work. I always get "command not found" and for sure it is no DOS command.
It would be nice to get the power from both worlds on windows ... nu shell and powershell
You can run a one-off command in PowerShell using the
-commandflag.So from Nu (or cmd.exe or any other shell), something like this will work:
(you may need to replace
pwshwithpowershellif you want an older Windows Powershell version)