![]() ![]() The PSWindowsUpdate PowerShell module can also be used to deploy Windows updates on remote computers. Every single action is logged, which helps with the troubleshooting process. If you don’t want to install a separate module, you can run the following command to force start Windows Update using PowerShell: Start-Process -FilePath ms-settings:windowsupdate Deploy Updates on Remote Computers. The PSAppDeployToolkit does extensive logging. If ($deploymentType -ne "uninstall") # Catch any errors in this scriptĮxit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations "$scriptDirectory\SupportFiles\Get-UOAHotfix.ps1" "$scriptDirectory\SupportFiles\Get-ScheduledTask.ps1" "$scriptDirectory\SupportFiles\Get-PendingReboot.ps1" Having a proper grip of these updates is paramount for your production workflow as they often start automatically during business hours resulting in downtime. "$scriptDirectory\SupportFiles\Get-ApplicationInfo.ps1" Microsoft Windows provides its own patch management solution referred to as Windows Update. "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1" ![]() # Dot source the App Deploy Toolkit Functions $scriptDirectory = Split-Path -Parent $MyInvocation.M圜ommand.Definition $deployAppScriptParameters = $psBoundParameters $deployAppScriptFriendlyName = "Deploy Application" # Variables: Script - Do not modify this section $appName = "Install or Uninstall Windows Updates" The below command will INTERACTIVELY Uninstall all the updates installed in the last 10 days.\Deploy-Application.EXE -DeploymentType UnInstall -DeployMode Interactive -Updatesince 10 Full script : The below command will SILENTLY Uninstall all the updates installed in the last 10 days.\Deploy-Application.EXE -DeploymentType UnInstall -DeployMode Silent -Updatesince 10 The below command will INTERACTIVELY install all the updates released (Approved: if using WSUS) in the last 10 days from WSUS (if configured, or uses Microsoft Windows Update site).\Deploy-Application.EXE -DeploymentType Install -DeployMode Interactive -Updatesince 10 The below command will SILENTLY install all the updates released (Approved: if using WSUS) in the last 10 days from WSUS (if configured, or uses Microsoft Windows Update site).\Deploy-Application.EXE -DeploymentType Install -DeployMode Silent -Updatesince 10 Logging is done to: C:\Windows\Logs\Software Install MS Updates: This can be deployed using SCCM if Software Update Point is turned off or if you prefer a Package deployment method of distributing software updates. The script uses whatever update source is made available to the machine to download and install the updates. I’ve used PSAppDeployToolkit to accomplish the task. The attached script installs or uninstalls Microsoft Updates in the last ‘N’ days. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |