The idea was to call any powershell script (.ps1), located in the same folder as that .vbs script:
Code:
Dim sCurPath sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".") 'WScript.Echo sCurPath Set objShell = CreateObject("Wscript.Shell") objShell.Run("powershell.exe –noexit &'" & sCurPath & "\SomeScript.ps1'")
I hope it helps someone.
Tags: invoke, PowerShell, start, vbs
You must be logged in to post a comment.
No comments
Comments feed for this article
Trackback link: http://mariuszgal.com/blog/wp-trackback.php?p=74