Update-Windows10
Description
The Update-Windows10
script manages Windows 10 feature updates, preventing automatic reboots during the upgrade process. It provides a high-level assessment of the system prior to upgrading, verbose logging during the upgrade, and reporting features for success and failure.
Requirements
- The reboot parameter must be set.
Usage
-
Determine if a status update is desired:
(status Update)
- Returns the values found in the registry regarding the script's reporting feature.
- Creates an event log for the completion of the script.
-
Running the upgrade:
(Running the upgrade)
- Initializes the reporting feature.
- Determines if diagnostic issues are present.
(not present)
- Removes old build notification restrictions.
- Removes old upgrades.
- Removes temporary files.
- Checks free space.
- If not enough space, the script exits.
- Schedules a new diagnostic to gather logs on the next reboot.
- Schedules the status update trigger to run on the next reboot.
- Runs a new upgrade.
(present)
- Unregisters any diagnostic scheduled job.
- Checks for Windows hardware/software compatibility issues.
(not present)
- Outputs to the log that no issues were found.
(present)
- Retrieves Windows hardware compatibility.
- Retrieves Windows software compatibility.
- Runs diagnostics log retrieval.
.\Update-Windows10.ps1 -Reboot None
Parameters
Diagnostics
This parameter sets a scheduled task on the system to identify and log errors and configuration issues. The task writes these issues to the appropriate log files. It operates on a timed trigger and should not be executed manually.
Reboot
This parameter provides options for restarting the system:
Auto
: Automatically reboots the system 30 minutes after completion.None
: Prevents the system from rebooting.
StatusUpdate
This parameter toggles the Status Update feature of the script. It operates on a timed trigger and should not be executed manually.
Parameter | Alias | Required | Default | Type | Description |
---|---|---|---|---|---|
Diagnostics | N/A | No | False | Switch | Sets a scheduled task to log errors and configuration issues. |
Reboot | N/A | No | ValidateSet | Options: Auto (reboots 30 minutes after completion), None (no reboot). | |
StatusUpdate | N/A | No | False | Switch | Enables status updates for reporting purposes only. |
Output
The script generates log, result, and error files at the following locations:
.\\Update-Windows10-log.txt
.\\Update-Windows10-Error.txt