Darktux
Darktux

Reputation: 427

How to make background window not appear while executing powershell script

Whenever i execute the gui powershell script, in addition to gui form , the background window(a command window) appears; how to eliminate that , should i execute the script in any different way?

-> please do let me know if any additional questions regarding this.

Upvotes: 0

Views: 1050

Answers (1)

CB.
CB.

Reputation: 60910

try create a shortcut calling the script with the -windowstyle parameter:

powershell.exe -sta -WindowStyle Hidden ".\myGUIscript.ps1"

This run powershell console then close it but let the GUI contiune his job

Upvotes: 2

Related Questions