Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless warnings and failed download #225

Open
mjmeans opened this issue Aug 10, 2023 · 2 comments
Open

Endless warnings and failed download #225

mjmeans opened this issue Aug 10, 2023 · 2 comments

Comments

@mjmeans
Copy link

mjmeans commented Aug 10, 2023

The below code, when run as administrator in Powershell ISE in Windows 10 Enterprise, results in a few files downloaded, but then endless repeated messages like
WARNING: [12:09:47][Start-BitsJobProcess] Failure for 2023-02 Cumulative Update for .NET Framework 4.8 for Windows Server 2016 for x64 (KB5022503) | The system cannot find the file specified. (Exception from HRESULT: 0x80070002) WARNING: [12:09:47][Start-BitsJobProcess] Failure for kbupdate | The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

`$kbs = Get-KbUpdate -Source Web -MaxPages 9 -OperatingSystem 'Windows Server 2016' -Pattern 'NET Framework' -Exclude 1709, 1803
$kbs

foreach ($kb in $kbs)
{
$file = Split-Path $kb.Link -Leaf
$json = $file.Replace('.msu','.json')
Write-Host "$($kb.Id) $($file) $($kb.Title)"

if(!(Test-Path $json -PathType Leaf ))
{
    Get-KbUpdate $kb.UpdateId | Save-KbUpdate -AllowClobber
    $kb | ConvertTo-Json | Out-File $json
    $fileItem = Get-Item $file
    (Get-Item $json).CreationTime = $fileItem.CreationTime
    (Get-Item $json).LastAccessTime = $fileItem.LastAccessTime
    (Get-Item $json).LastWriteTime = $fileItem.LastWriteTime
    Write-Output "$($kb.Id) $($file) $($kb.Title)" | Out-File '_updates.lst' -Append
}

}
`

@krzydoug
Copy link

I am unable to duplicate this issue on several different machines.

@mjmeans
Copy link
Author

mjmeans commented Aug 25, 2023

In my case I lost internet access during one of the downloads and had to restart the script. Maybe try running the script. Then in the middle of one of the downloads cut internet and then CTRL+C to break out. After the internet restores, run the script again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants