This cmdlet is part of the Vexasoft Cmdlet Library. You can download it now or click here to find out more.

Show-Window

Synopsis

Restores windows previously hidden by the Set-Window cmdlet.

Syntax

  • Show-Window [-Window]

Description

Show-Window is used to bring back windows hidden by the Hide-Window cmdlet.

Parameters

  • Window The hidden window to restore. HiddenWindow objects are generated by the Hide-Window cmdlet . Any windows hidden by the current PowerShell session can be found in the $HiddenWindows variable.

Inputs

Show-Window accepts HiddenWindow objects as an input parameter. Hidden window objects are output by the Hide-Window cmdlet and all windows that have been hidden by the Hide-Window cmdlet in the current PowerShell session will also have a corresponding HiddenWindow object stored in the $HiddenWindows variable.

Outputs

Show-Window does not return any PowerShell objects.

Notes

There are no notes associated with the Show-Window cmdlet.

Example 1

Show-Window must be used in conjunction with hidden window objects. Windows hidden in the current PowerShell session are stored in the $HiddenWindows variable.

This command will unhide any windows hidden by the current PowerShell session:

C:\PS>$HiddenWindows | Show-Window

Example 2

$HiddenWindows is indexable. This command will unhide the most recent hidden window:

C:\PS>$HiddenWindows[0] | Show-Window

Example 3

$HiddenWindows is searchable, like any other PowerShell array. This command will unhide any Outlook windows that have been hidden during the current PowerShell session:

C:\PS>$HiddenWindows | Where {$_.ProcessName -eq "outlook"} | Show-Window