Powershell - Set Boot

Boot Option: 1: Safe Mode / 2: Networking / 3: Command Prompt

bcdedit /set {default} safeboot minimal
bcdedit /set {default} safeboot network
bcdedit /set {default} safeboot safebootwithalternateshell

Powershell Get Hardware Information

Example: Get-CimInstance -ClassName Win32_Processor | Format-List Name, NumberOfCores, NumberOfLogicalProcessors, MaxClockSpeed, SerialNumber 
Example: Get-CimInstance -ClassName Win32_PhysicalMemory | Format-Table Manufacturer, DeviceLocator, Capacity, Speed, SerialNumber 

CIM WMI Provider Information

Reference: CIM Classes and Description Names


Powershell Display API Calls

Install-Module Display

Example: Install-Module DisplayConfig 

Show Commands

Example: Get-Command -Module DisplayConfig 

Set Display 1 Resolution

Example: Set-DisplayResolution -DisplayId 1 -Width 2560 -Height 1440 

Display Settings: Export / Import

Example: Get-DisplayConfig | Export-Clixml C:\temp\my-display-layout.xml
Example: Import-Clixml C:\temp\my-display-layout.xml | Use-DisplayConfig

Display: Enable / Disable

Example: Disable-Display -DisplayId 2
Example:  Enable-Display -DisplayId 2