How to hide Powershell background window

I’ve changed from Windows batch files to Powershell for almost every other repeated tasks & one of the scripts that I use to connect to our IKEv2 VPN script has a shortcut on my desktop. This script helps me to connect and disconnect from the VPN network just by double clicking the shortcut. You can checkout the script here

I had multiple iterations for the script and kept on deleting and recreating the shortcut and noticed that a black window started appearing when I executed script from the shortcut.

All I could remember was, not changing any settings for the Powershell & couldn’t find a “solution” (that was mere eyesore to my rigid expectations). Interestingly, my semi desktop/server class box didn’t have this “issue”, whenever I executed the script from the shortcut, all I was provided was the “Connected” or “Disconnected” message boxes.

After sometime, I decided to check the shortcut properties on my desktop & noticed that the “Run” option was selected as “Minimized”

Powershell provides many switches & one of the switches is “WindowStyle” that supports Normal, Minimized, Maximized and Hidden styles for the Window. Well, the style “Minimized” just hid the entire window, including the message popups that had prompts.

Quickly I moved to my laptop and changed the Run to “Minimized” and that was it. No more annoying black window behind my script message boxes! No more script outputs shown on the screen. So, if you reached here seeking a how to hide those annoying black windows, give this a try.

KB5009543 | Jan 2022 cumulative update breaks IKEv2 VPN Connections

KB5009543 or Cumulative update Jan 2022 for Windows 10 and Windows 11 is currently breaking IKEv2 VPN connections. If you are experiencing an unexpected connection failure with a vague error message like “General processing error”, please follow the below steps.

Go to Program and Features -> Installed Updates and uninstall KB5009543. Reboot the box and the VPN connection should start working normally. Optionally you may disable the Windows Update for a period of time so that the same update will not get installed once again. Please note, Microsoft releases updates to their products quite often to resolve issues those were identified. Few times these updates open new issues, like the one happened with this particular KB.

While there are no straight forward methods available to “stop” Windows updates, you can use multiple methods to disable Windows update completely, which we don’t recommend. One of them is using group policies on the local machine.

If you still consider disabling Windows updates temporarily/long term, please refer this excellent tutorial

Hope this helps.

Windows 10 | parameter is incorrect

Hi guys

I can’t confidently say whether it is the KB4557957 or something that deliberate by me, I had serious troubles connecting to IKEV2 VPN, ending with a message “Parameter is incorrect”.

Although I landed on the solution earlier, I disrespected the order & spent another day trying to figure out the “issues”. Finally I did as the post asks & “fixed” the problems. Enough talks, just follow the instructions as mentioned on this page