Invoke PowerShell with ActiveDirectory module not working

If it works with x86, have you tested to target the 32-bit executable of Powershell instead?

CommandText:

"Set-ExecutionPolicy Unrestricted -Scope CurrentUser
$powershell32 = $env:SystemRoot + '\SysWOW64\WindowsPowerShell\v1.0\powershell.exe'
& $powershell32 -file 'C:\Test\Hello64.ps1'"

Change “C:\Test\Hello64.ps1” to the ps file you want to execute.

image

image