Thursday, 18 March 2021

Bat file to execute PowerShell

Watch this example on YouTube


 1. PowerShell File

$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup("Hello World", 0, "Done", 0x1)


2. Bat file

Powershell.exe -executionpolicy remotesigned -File "C:\Temp\PopupTest.ps1"

No comments:

Post a Comment