I am using following Sub to pass arguments to Powershell.
Sub testpower()
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run ("Powershell.exe -file .\test.ps1 -path ""Shell.txt"" ")
End Sub
But,the output is not generated when run in VB,but if try to run directly from run command,it gives the desired result.Please help.
test.ps1 script:
Param([String]$path)
Get-AuthenticodeSignature $path | Out-File "C:\Documents and Settings\acmeuser1\output.txt"