Script Library

PowerShell Script Library

Production-tested scripts for endpoint management, compliance, and automation. Every script ships with parameters, usage examples, and prerequisites.

5 articles

PowerShell

Get-StaleDevices

Identifies devices inactive for a configurable threshold across Intune, Entra ID, and on-premises Active Directory. Outputs CSV and HTML reports with remediation actions.

IntuneEntra IDActive Directory
PowerShellNew

Invoke-WindowsHardening

Applies a configurable subset of CIS Level 1 and Level 2 controls to Windows 10/11 endpoints. Runs locally or via Intune remediation script. Generates a pre/post compliance delta report.

CISHardeningSecurity
PowerShell

Get-PatchComplianceReport

Queries WSUS or Windows Update for Business status via WMI and Graph API. Produces a per-device patch lag report with severity breakdown and exportable HTML dashboard.

Patch ManagementWSUSWUfB
PowerShell

New-AdminLabVM

Provisions a clean Windows 11 test VM on Hyper-V using an unattend.xml answer file. Configures networking, WinRM, and optional domain join for a repeatable lab baseline.

Hyper-VLabAutomation
PowerShellNew

Export-IntuneDeviceReport

Uses the Microsoft Graph API to export a full Intune device inventory including compliance state, OS version, last check-in, and primary user to CSV or JSON.

IntuneGraph APIReporting