PoshPAIG icon indicating copy to clipboard operation
PoshPAIG copied to clipboard

KB title is mangled if it has parentheses in the name

Open sou7611 opened this issue 7 years ago • 0 comments

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.

sou7611 avatar Jun 15 '17 20:06 sou7611