This project is read-only.

Couple changes I've made to your script

Nov 16, 2011 at 3:16 PM

In your $_.url filter, I added a / in front of windows otherwise IE 9 will be pulled down,  I also am looking into adding additional switches to pull just security updates and Critical updates rather than what i'm currently doing below.


$nodex86 = $x.OfflineSyncPackage.FileLocations.FileLocation | where {$_.url -like "*windows6.1*x86*" -and $_.url -Notlike "*beta*"}  | Foreach-object {Get-WebFile $_.url $scriptpath $scriptpath"\x86" $false}

My customizations in red:

$nodex86 = $x.OfflineSyncPackage.FileLocations.FileLocation|sort-object -property 'Url'|where {($_.url -like "*/windows6.1*x86*" -and  $_.url -like "*/secu/*" -and $_.url -Notlike "*beta*") -or ($_.url -like "*/windows6.1*x86*" -and $_.url -like "*/crup/*" -and $_.url -Notlike "*beta*") }  | Foreach-object {Get-WebFile $_.url $scriptpath $scriptpath"\x86" $false}