How to Call Powershell script with Active Perl in IIS 8 Windows 2012?

Posted by arianka on 2015-08-12 03:00

Dear Perl experts hi,

Does anyone of you know? How to call powershell script with Active Perl in Windows server 2012 IIS 8?

I only know one way with Soap::Transport module worked in Windows server 2003. but it is not working anymore in Windows Server 2012.

Appreciate your honest reply

ActiveState Staff
Thu, 2015-08-20 09:50

When you run under IIS, the SYSTEM userID you "run as" is very restricted.

Instead of
PS C:\> C:\Belfry\Myscript.ps1
you will generally need to supply the full path to PowerShell. The .ps1 script must also be in a directory that can be found by the userID (not above the website root folder).

Note- Running the PowerShell binary is disabled by default for users. You will almost certainly have problems with the Set-ExecutionPolicy for the SYSTEM userID. Your systems team may not allow you to change this value, as it would be reasonable to consider it a security risk.