I have a requirement of running powershell script in silent mode through vbscript(cscript.exe).
Basic steps for script are as follow.
vbscript
WScript.StdOut.WriteLine "Welcome..."
WScript.StdOut.WriteLine "First Step..."
WScript.Sleep Int(2000)
Set objShell = CreateObject("Wscript.Shell"): objShell.Run "powershell -nologo -file D:\basic\child.ps1" ,0,true
WScript.StdOut.WriteLine "Script Completed."
WScript.Sleep Int(5000)
powershell script
Write-Host "Some Text Printed"
Start-Sleep -s 2
Atthis point, I like the powershell script to write to vbscript(cscript.exe) console.
I am running vb script as follow.
cscript d:\basic\script.vbs
Is there any work around for this requirement.