Automate Windows Updates with PSWindowsUpdate - Script Included!

Опубликовано: 09 Июль 2026
на канале: The Swedish Sysadmin
787
17

https://pastebin.com/wyepSGTu

Learn how to create a powerful PowerShell script to completely automate downloading and installing Windows and Microsoft updates. In this step-by-step guide, we'll walk you through writing the script, handling dependencies,
setting up logging, and even creating a recurring scheduled task to make your system maintenance hands-free. This is perfect for system administrators managing Windows Server 2025 or any modern Windows environment.

In this video, you will learn how to:
Set up the necessary folders for your script and logs.
Install the PSWindowsUpdate PowerShell module and its dependencies.
Troubleshoot common installation issues like TLS version errors.
Write a script to check for, download, and install Windows & Microsoft updates.
Implement a logging system to track when the script runs and what it does.
Automatically create a scheduled task in PowerShell to run your update script on a recurring basis.
Verify that the scheduled task is working correctly.

Timestamps:
0:00 - Introduction to the PowerShell Automation Script
0:36 - Creating Folders for the Script and Logs
1:23 - Installing the PSWindowsUpdate Module
2:08 - Troubleshooting Tip: Forcing TLS 1.2
3:03 - Writing the Update and Logging Script
4:50 - Monitoring the Update Process with Task Manager
5:26 - Reviewing the Log File After Updates
5:55 - Scripting the Creation of a Scheduled Task
7:03 - Verifying the Task in Windows Task Scheduler
7:44 - Final Test and Conclusion

Hashtags:
#PowerShell #WindowsUpdate #Automation #Scripting #WindowsServer #SysAdmin #ITPro #PowerShellScript #TechTutorial