Catalogs/NotMatching.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$Catalog = Import-Clixml "D:\GitHub\Modules\OSDBuilder\Catalogs\Windows Server 2016.xml"
$CatalogErrors = @()
$CatalogCorrections = @()

foreach ($item in $Catalog) {
    if ($($item.FileName) -notlike "*$($item.KBNumber)*") {   
        $CatalogErrors += $item
    }

    $pattern = 'KB(\d{4,6})'
    $FileKBNumber = [regex]::matches($item.FileName, $pattern).Value
    $TitleKBNumber = [regex]::matches($item.FileName, $pattern).Value


}
$CatalogErrors | Out-GridView