Executing Windows Powershell Commands through nexec

Version 1

    The new shell for Windows, Powershell, has some problems with executing remotely. This command will hang indefinitely:


    nexec -i -e cmd /c "powershellC:/scripts/exchange_server_info.ps1"


    But this works:


    nexec -i -e cmd /c "echo . | powershellC:/scripts/exchange_server_info.ps1"


    Remember to lower your security to run scripts (if you need something more than a command):


    In powershell type: Set-ExecutionPolicy RemoteSigned


    This will let you run scripts, but it doesn't open the server up to scripts downloaded from the network or internet.