-
Notifications
You must be signed in to change notification settings - Fork 5
nircmd_set_resolution.ps1
Corey Watson edited this page Dec 1, 2025
·
1 revision
Set Display Resolution using NirCmd.
Changes the display resolution using NirSoft's NirCmd utility. Downloads NirCmd if not already present, then sets the specified resolution.
This script automates display resolution changes on Windows systems using the NirCmd utility. It's useful for standardizing display settings across multiple machines or troubleshooting display configuration issues remotely.
- Windows 10/11 or Windows Server
- Internet access for NirCmd download
- Display must support the requested resolution
-
$resolutionWidth: Desired screen width in pixels (e.g., 1920) -
$resolutionHeight: Desired screen height in pixels (e.g., 1080) -
$colorDepth: Color depth in bits (e.g., 32) -
$destinationFolder: Folder to store NirCmd utility (default:C:\limehawk\nircmd)
- Creates destination directory if it doesn't exist
- Downloads NirCmd (x86 version for compatibility)
- Extracts NirCmd from zip archive
- Sets display resolution to specified values
- Cleans up temporary zip file
- Downloads from official NirSoft website
- No secrets in logs
-
0= Success -
1= Failure
[ INPUT VALIDATION ]
--------------------------------------------------------------
Resolution : 1920 x 1080
Color Depth : 32-bit
Destination : C:\limehawk\nircmd
[ DOWNLOADING NIRCMD ]
--------------------------------------------------------------
Download URL : https://www.nirsoft.net/utils/nircmd.zip
Download complete
[ CHANGING RESOLUTION ]
--------------------------------------------------------------
Executing : nircmd.exe setdisplay 1920 1080 32
Resolution changed successfully
[ FINAL STATUS ]
--------------------------------------------------------------
Result : SUCCESS
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- v1.0.0 (2024-12-01) - Initial release - migrated from SuperOps
- View Script Source
- Scripts - Back to script index