Forum Discussion

tarente's avatar
tarente
Copper Contributor
Jan 22, 2021
Solved

Powershell issues running script from Windows Service 01/02 - powershell modules not available

Hi, I am facing problems executing some powershell scripts from a Windows Service.   Background The Windows Service (started with an AD user) will execute a command through Process Class. It wil...
  • tarente's avatar
    tarente
    Jan 23, 2021
    Solved!
    The problem was that powershell was executing in 32-bits thru the service and in 64-bits when launched from the command prompt.
    I copied the code in described in https://stackoverflow.com/questions/19055924/how-to-launch-64-bit-powershell-from-32-bit-cmd-exe to the beginning of the script and now works as expected.

Resources