GenXdev.Windows provides comprehensive Windows system control — window management (get, set position, push/pop stack, foreground control), input simulation (keystroke injection, clipboard file operations), system administration (elevated commands, Windows Update, screensaver, environment refresh), monitor control (power on/off, screenshots, DPI scaling), and access to Windows known folders and taskbar settings.
- Allow resizing/repositioning/closing of Windows
- Get-Window will return a windows helper that allows you to manipulate the window
- Read/write access to Windows special folder locations
| Command | Aliases | What it does |
|---|---|---|
| Get-Window | — | Get window handles and info for processes |
| Get-WindowPosition | gwp |
Get the position, size, and state of windows |
| Set-WindowPosition | wp |
Position and resize windows on any monitor |
| Set-WindowPositionForSecondary | wps |
Position a window on a secondary monitor |
| Push-Window | pushw |
Save current window position to a stack |
| Pop-Window | popw |
Restore a window position from the stack |
| Send-Key | sendkeys, invokekeys |
Simulate keystrokes to any window |
| Set-ClipboardFiles | setclipfiles, scbf |
Set files to the clipboard for copy/paste |
| Get-ClipboardFiles | getclipfiles, gcbf |
Get files from the clipboard |
| Get-KnownFolderPath | folder |
Get the path of any Windows known folder |
| Set-KnownFolderPath | — | Redirect a Windows known folder to a new location |
| Invoke-CommandElevated | — | Run code as administrator |
| Invoke-WindowsUpdate | updatewindows |
Check for and install Windows updates |
| Enable-Screensaver | — | Start the configured screensaver |
| Set-TaskbarAlignment | — | Set taskbar to left or center (Windows 11) |
| Set-MonitorPowerOff | poweroff |
Turn off all monitors |
| Set-MonitorPowerOn | wakemonitor, monitoroff |
Wake the monitors |
| Send-WakeOnLan | — | Send a Wake-on-LAN magic packet |
| Show-ExceptionPanel | — | Display an exception in a Spectre.Console panel |
| Update-Environment | — | Refresh environment variables in the current session |
Window management: Get-Window gets window handles and info for processes.
Get-WindowPosition (gwp) gets window position, size, and state.
Set-WindowPosition (wp) positions and resizes windows on any monitor.
Set-WindowPositionForSecondary (wps) positions a window on a secondary
monitor. Push-Window (pushw) saves the current window position to a
stack. Pop-Window (popw) restores a window position from the stack.
Input: Send-Key (sendkeys, invokekeys) simulates keystrokes to a
window. Set-ClipboardFiles (setclipfiles, scbf) sets files to the
Windows clipboard. Get-ClipboardFiles (getclipfiles, gcbf) gets files
from the clipboard.
System: Invoke-CommandElevated runs code in an elevated PowerShell
session. Invoke-WindowsUpdate (updatewindows) checks for and installs
Windows updates. Enable-Screensaver starts the screensaver.
Set-TaskbarAlignment configures taskbar alignment. Update-Environment
refreshes environment variables. Show-ExceptionPanel displays an exception
in a Spectre.Console panel.
Known folders: Get-KnownFolderPath (folder) gets the path of a Windows
known folder. Set-KnownFolderPath redirects a known folder to a new
location.
Monitor: Set-MonitorPowerOff (poweroff) turns off monitors.
Set-MonitorPowerOn (wakemonitor, monitoroff) wakes monitors.
Send-WakeOnLan sends a Wake-on-LAN magic packet.
- GenXdev.Webbrowser — Browser window positioning
- GenXdev.Console — Monitor configuration for browser placement
- GenXdev.Hardware — Hardware detection (monitor count, etc.)
- GenXdev.Windows.WireGuard — WireGuard VPN management
- Full Cmdlet Reference