dev/Dev-CreateBcDvdRepository.ps1
$ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' # UI updates are always slow $InformationPreference = 'Continue' # Import-Module BcAdmin $DvdRepositoryPath = (Join-Path $env:SystemDrive 'DVD\BC') $CountryCode = 'DE' $LatestMinorVersionBc24 = 2 $LatestMinorVersionBc23 = 8 $LatestMinorVersionBc22 = 14 $MajorVersion = 22 for ($MinorVersion = 0; $MinorVersion -le $LatestMinorVersionBc22; $MinorVersion++) {^ if ($MinorVersion -ne 4 -and $MinorVersion -ne 10) { Write-Information "Downloading BC $($MajorVersion).$($MinorVersion) DVD ..." Get-BcDvd -MajorVersion $MajorVersion -MinorVersion $MinorVersion -CountryCode $CountryCode -DvdRepositoryPath $DvdRepositoryPath } else { Write-Information "BC $($MajorVersion).$($MinorVersion) DVD download has been withdrawn" } } $MajorVersion = 23 for ($MinorVersion = 0; $MinorVersion -le $LatestMinorVersionBc23; $MinorVersion++) { Write-Information "Downloading BC $($MajorVersion).$($MinorVersion) DVD ..." Get-BcDvd -MajorVersion $MajorVersion -MinorVersion $MinorVersion -CountryCode $CountryCode -DvdRepositoryPath $DvdRepositoryPath } $MajorVersion = 24 for ($MinorVersion = 0; $MinorVersion -le $LatestMinorVersionBc24; $MinorVersion++) { Write-Information "Downloading BC $($MajorVersion).$($MinorVersion) DVD ..." Get-BcDvd -MajorVersion $MajorVersion -MinorVersion $MinorVersion -CountryCode $CountryCode -DvdRepositoryPath $DvdRepositoryPath } |