kanjasaha@xxxxxx wrote:
Quote:
> Hi,
>
> I have a similar problem I am dealing with. Hence posting in this
> discussion chain.
>
> I have a powershell script text.ps1
>
> And then I have a .js file which is invoking this text.ps1 using WSH.
>
> Here is the code:
>
> ------------------------------------------------------------------
>
>
> var objShell = WScript.CreateObject("WScript.Shell");
>
> var strCMD="powershell c:\\script\\text.ps1"
You're not calling powershell.exe properly for starters. This should
help somewhat:
http://blog.sapien.com/index.php/200...ed-powershell/
Marco
--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp
PowerGadgets MVP
http://www.powergadgets.com/mvp
Blog:
http://marcoshaw.blogspot.com