Skip to main content

Install WindowsUpdate PowerShell Module

Summary

This procedure installs the Windows Update PowerShell module.

Example Agent Procedure Log

TimeActionStatusUser
4:48:27 pm 14-Jun-23Windows Update PowerShell Module - InstallSuccess THENderek.joniak
4:48:26 pm 14-Jun-23Windows Update PowerShell Module - Install-0001After installation attempt software was: Installedderek.joniak
4:48:26 pm 14-Jun-23Execute PowerShell CommandSuccess THENderek.joniak
4:48:26 pm 14-Jun-23Execute PowerShell Command-0012Results returned to global variable #global:psresult# and saved in Documents tab of server.derek.joniak
4:48:26 pm 14-Jun-23Execute PowerShell Command-0012Informational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/910544681671025/GetFiles/../docs/psoutput.txt with the new contents from c:/kworking/psoutput.txt in THEN step 2.derek.joniak
4:48:26 pm 14-Jun-23Execute PowerShell Command-0011PowerShell command completed!derek.joniak
4:48:22 pm 14-Jun-23Execute PowerShell Command-0011Executing PowerShell "" -Command "if (!(Get-Module -Name PSWindowsUpdate -ListAvailable -ErrorAction SilentlyContinue)) \{ Write-Output 'Not Installed' } else \{ Write-Output 'Installed' }" >"c:/kworking/psoutput.txt"derek.joniak
4:48:22 pm 14-Jun-23Execute PowerShell Command-0010Sending output to global variable.derek.joniak
4:48:22 pm 14-Jun-23Execute PowerShell Command-0008New command variable is: -Command "if (!(Get-Module -Name PSWindowsUpdate -ListAvailable -ErrorAction SilentlyContinue)) \{ Write-Output 'Not Installed' } else \{ Write-Output 'Installed' }"derek.joniak
4:48:22 pm 14-Jun-23Execute PowerShell Command-0008Custom commands detected as if (!(Get-Module -Name PSWindowsUpdate -ListAvailable -ErrorAction SilentlyContinue)) \{ Write-Output 'Not Installed' } else \{ Write-Output 'Installed' }derek.joniak
4:48:20 pm 14-Jun-23Execute PowerShell Command-0002PowerShell is present.derek.joniak
4:48:19 pm 14-Jun-23Windows Update PowerShell Module - Install-0001Module imported into PowerShellderek.joniak
4:48:19 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)Success THENderek.joniak
4:48:18 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0014PowerShell command completed!derek.joniak
4:48:17 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0011Executing 64-bit PowerShell command as System: "" -command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force; Import-Module PSWindowsUpdate" ""derek.joniak
4:48:17 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0013Not sending output to variable.derek.joniak
4:48:17 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0008Custom commands detected as Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force; Import-Module PSWindowsUpdatederek.joniak
4:48:17 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0003No PowerShell file variable detected.derek.joniak
4:48:16 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0002PowerShell is present.derek.joniak
4:48:14 pm 14-Jun-23Windows Update PowerShell Module - Install-0001Folder copied to modules folderderek.joniak
4:48:14 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)Success THENderek.joniak
4:48:14 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0014PowerShell command completed!derek.joniak
4:48:13 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0011Executing 64-bit PowerShell command as System: "" -command "Copy-Item -Path "c:/kworking/PSWindowsUpdate" -Destination "$env:WINDIR/System32/WindowsPowerShell/v1.0/Modules" -Recurse" ""derek.joniak
4:48:13 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0013Not sending output to variable.derek.joniak
4:48:13 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0008Custom commands detected as Copy-Item -Path "c:/kworking/PSWindowsUpdate" -Destination "$env:WINDIR/System32/WindowsPowerShell/v1.0/Modules" -Recursederek.joniak
4:48:13 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0003No PowerShell file variable detected.derek.joniak
4:48:12 pm 14-Jun-23Execute PowerShell Command (64-bit, Run As System)-0002PowerShell is present.derek.joniak
4:48:11 pm 14-Jun-23Execute PowerShell CommandSuccess THENderek.joniak
4:48:11 pm 14-Jun-23Execute PowerShell Command-0011PowerShell command completed!derek.joniak
4:48:09 pm 14-Jun-23Execute PowerShell Command-0011Executing PowerShell "" -Command "Copy-Item -Path "c:/kworking/PSWindowsUpdate" -Destination "$env:WINDIR/System32/WindowsPowerShell/v1.0/Modules" -Recurse" ""derek.joniak
4:48:09 pm 14-Jun-23Execute PowerShell Command-0010Not sending output to variable.derek.joniak
4:48:09 pm 14-Jun-23Execute PowerShell Command-0008New command variable is: -Command "Copy-Item -Path "c:/kworking/PSWindowsUpdate" -Destination "$env:WINDIR/System32/WindowsPowerShell/v1.0/Modules" -Recurse"derek.joniak
4:48:09 pm 14-Jun-23Execute PowerShell Command-0008Custom commands detected as Copy-Item -Path "c:/kworking/PSWindowsUpdate" -Destination "$env:WINDIR/System32/WindowsPowerShell/v1.0/Modules" -Recursederek.joniak
4:48:06 pm 14-Jun-23Execute PowerShell Command-0002PowerShell is present.derek.joniak
4:48:05 pm 14-Jun-23Windows Update PowerShell Module - Install-0001Folder unzipped successfullyderek.joniak
4:48:05 pm 14-Jun-23Unzip FileSuccess THENderek.joniak
4:48:05 pm 14-Jun-23Unzip File-0005Zip commands run - c:/kworking/PSWindowsUpdate.zip extracted to c:/kworkingderek.joniak
4:48:01 pm 14-Jun-23Unzip File-0002Overwrite is not setderek.joniak
4:48:01 pm 14-Jun-23Windows Update PowerShell Module - Install-0001ZIP file downloaded. Proceeding to unzip.derek.joniak
4:48:00 pm 14-Jun-23Windows Update PowerShell Module - Install-0001Windows Update Module is not installed, proceeding to install.derek.joniak
4:48:00 pm 14-Jun-23Windows Update PowerShell Module - InstallWindows Update module is: Not Installedderek.joniak
4:48:00 pm 14-Jun-23Execute PowerShell CommandSuccess THENderek.joniak
4:48:00 pm 14-Jun-23Execute PowerShell Command-0012Results returned to global variable #global:psresult# and saved in Documents tab of server.derek.joniak
4:48:00 pm 14-Jun-23Execute PowerShell Command-0012Informational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/910544681671025/GetFiles/../docs/psoutput.txt with the new contents from c:/kworking/psoutput.txt in THEN step 2.derek.joniak
4:47:59 pm 14-Jun-23Execute PowerShell Command-0011PowerShell command completed!derek.joniak
4:47:57 pm 14-Jun-23Execute PowerShell Command-0011Executing PowerShell "" -Command "if (!(Get-Module -Name PSWindowsUpdate -ListAvailable -ErrorAction SilentlyContinue)) \{ Write-Output 'Not Installed' } else \{ Write-Output 'Installed' }" >"c:/kworking/psoutput.txt"derek.joniak
4:47:57 pm 14-Jun-23Execute PowerShell Command-0010Sending output to global variable.derek.joniak
4:47:57 pm 14-Jun-23Execute PowerShell Command-0008New command variable is: -Command "if (!(Get-Module -Name PSWindowsUpdate -ListAvailable -ErrorAction SilentlyContinue)) \{ Write-Output 'Not Installed' } else \{ Write-Output 'Installed' }"derek.joniak
4:47:57 pm 14-Jun-23Execute PowerShell Command-0008Custom commands detected as if (!(Get-Module -Name PSWindowsUpdate -ListAvailable -ErrorAction SilentlyContinue)) \{ Write-Output 'Not Installed' } else \{ Write-Output 'Installed' }derek.joniak
4:47:53 pm 14-Jun-23Execute PowerShell Command-0002PowerShell is present.derek.joniak
4:47:45 pm 14-Jun-23Run Now - Windows Update PowerShell Module - InstallAdmin derek.joniak scheduled procedure Run Now - Windows Update PowerShell Module - Install to run at Jun 14 2023 5:47 PMderek.joniak

Dependencies

PowerShell: 5.1.0

Output

Agent Procedure Logs