Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How do I pass variable from VB script to Powershell?

$
0
0

I tried something like this:

In VBS:

strA = "some value"

Set objShell = WScript.CreateObject("WScript.Shell")
objshell.Run ("powershell Start-Process powershell -Verb runAs ABC.ps1" & strA)
In PS:
$strB = strA
But obviously it didn't work...any idea is very much appreciated. Thank you.

Viewing all articles
Browse latest Browse all 6937

Trending Articles