Closed BigSteef closed 7 years ago
@BigSteef Which script are using that is causing this error?
@BigSteef I think I see what you are talking about. This error will be thrown if $OverWrite is set to $false and you specify $Folderpath, and the ofl.cab does not exist in the $FolderPath. This behavior is expected.
If you are not specifying any of the parameters and an error is still being thrown then we would need to see what is going on in that script. Please let us know which script is throwing the error in this scenario.
when you download the scripts, ofl.cab is not already in place and get-channelxml checks to see if its there and attempts to download it.
problem is if it finds its not there: if (Test-Path -Path $XMLFilePath) {
it causes a throw
throw "File missing $FolderPath\ofl.cab"
which stops it getting to the next part of the function which downloads the file:
if ($downloadFile) { $webclient = New-Object System.Net.WebClient $XMLFilePath = "$env:TEMP/ofl.cab" $XMLDownloadURL = "http://officecdn.microsoft.com/pr/wsus/ofl.cab" $webclient.DownloadFile($XMLDownloadURL,$XMLFilePath)