Performs a series of simple Windows maintenance tasks and [optionally] reboots the computer:
- Runs SFC "scannow"
- Executes a DISM Restore Health
- Flushes the DNS cache
- Cycles the network adapters
- Refreshes Group Policy (domain-joined systems)
- Installs all pending Windows Updates
- [Optional] reboots the computer
This script requires the OZOLogger
and PSWindowsUpdate
PowerShell modules which are available in PowerShell Gallery. Ensure your system is configured for this repository then execute the following in an Administrator PowerShell:
Install-Module OZOLogger,PSWindowsUpdate
This script is published to PowerShell Gallery. Ensure your system is configured for this repository then execute the following in an Administrator PowerShell:
Install-Script ozo-windows-support-doctor
ozo-windows-support-doctor
Parameter | Description |
---|---|
Reboot |
Reboots the computer after performing the maintenance tasks. |
When the One Zero One Windows event log provider is available, messages are written to Applications and Services > One Zero One > Operational. Otherwise, messages are written to the Microsoft > Windows > PowerShell > Operational provider with event ID 4100.
Run this script in an Administrator PowerShell.
Special thanks to my employer, Sonic Healthcare USA, who supports the growth of my PowerShell skillset and enables me to contribute portions of my work product to the PowerShell community.