PowerShell cmdlets to check WindowsUpdate and return patch list.
This script is intended for offline Windows patching. (MBSA 2.2 currently not support Windows 8/Windows Server 2012)
following sample check WindowsUpdate for specified computer, and download files to network share.
$target = $env:COMPUTERNAME
#$filter = "IsAssigned=1 and IsHidden=0"
$filter = "IsHidden=0"
#Get WindowsUpdate file list for target computer(if not domain environment -Credential parameter needed)
$results = Invoke-Command -Computer $target -ScriptBlock ${function:Get-WindowsUpdateFileList} -ArgumentList $filter
#Download files
$destination= "\\172.16.0.1\Shared\Images\WindowsUpdate\WindowsServer2012"
foreach($update in $results)
{
$params = @{
Source = $update.DownloadURL
DisplayName = $update.Title
Description = $update.DownloadURL
Destination = $destination
}
Start-BitsTransfer @params
}
Hi Team,
How to modify the above code to download only give KB article number and save it local computer.
Request you to kindly help me to modify.
Thanks and regards,
senthil