Executing Powershell from Perl

Posted by Marlin on Stack Overflow See other posts from Stack Overflow or by Marlin
Published on 2010-05-05T01:49:04Z Indexed on 2010/05/05 1:58 UTC
Read the original article Hit count: 581

Filed under:
|

Hi,

I have a bunch of Powershell scripts which I need to run from Perl. I have the following code but for some reason the Powershell scripts dont get invoked. I have tried both the backtick and the system command

$path = "C:/Users/PSScript.ps1"; $pwspath = "c:/windows/system32/windowspowershell/v1.0/powershell.exe";

$output = $pwspath -command $path;

system($pwspath -command $path);

Please help me out here.

© Stack Overflow or respective owner

Related posts about perl

Related posts about powershell