Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Launching a powershell script from vbscript with different credentials

$
0
0

 Finally after many attempts, the line below does what it should.  Now I need to get the correct syntax to run it with alternate credentials.

objShell.Run("%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command\\net\Hartfiles\Install\Software\NewUser\Create2007Mailbox.ps1" + "'" + strCanonicalName + "'" + " " + "'" + strUser + "'")

All I want to do is launch the powershell shell (From a VBS script) as a different user.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>