L
L
lerneree2020-08-24 16:50:32
PowerShell
lerneree, 2020-08-24 16:50:32

How to call WSH from POWERSHELL?

How to call WSH from POWERSHELL?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Ryzhkin, 2020-08-24
@Franciz

var shell = new ActiveXObject("WScript.Shell");
WScript.Echo(shell.exec("powershell -Command $Host.Version; Exit").StdOut.ReadAll());
Read manuals

M
MaxKozlov, 2020-08-25
@MaxKozlov

$WshShell = New-Object -comObject WScript.Shell
$WshShell.Popup('aaa')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question