PoshPAIG
PoshPAIG copied to clipboard
KB title is mangled if it has parentheses in the name
Example :
Portuguese (Brazil) Language Pack - Windows 7 Service Pack 1 for x64-based Systems
Orig code: $temp.Title = ($update.Title -split('('))[0] $temp.KB = (($update.title -split('('))[1] -split(')'))[0]
This fixes it (note the change in order; have to extract the KB string to filter it from the title): $temp.KB = $update.title.Split('(')[-1].Trim().Replace("KB","").Replace(")", "") $temp.Title = ($update.Title.Replace("(KB"+$temp.KB+")", ""))
For semantics purposes, I also remove the "KB" from the kb# string, as it's already in a column titled that.