Hi Team,
I have a .csv file which contains the operating system and kb articles, I like to test the kb articles against when the Operating system matches. but the Operating system has a copyright symbol it is not coming when I extract only the operating system.
PS C:\Scripts> $patchesToVerify
Operating_System KB_Article
Microsoft Windows Server 2012 R2 Standard KB4530730
Microsoft Windows Server 2016 Standard KB4530689
Microsoft® Windows Server® 2008 Standard KB4530719
Microsoft Windows Server 2012 Standard KB4530698
Microsoft Windows Server 2008 R2 Standard KB4530692
Microsoft Windows Server 2016 Standard KB4532936
Microsoft Windows Server 2016 Standard KB4534293
Microsoft Windows Server 2016 Standard KB4532933
Microsoft® Windows Server® 2008 Standard KB4534312
Microsoft Windows Server 2012 R2 Standard KB4534978
Microsoft® Windows Server® 2008 Standard KB4534979
Microsoft Windows Server 2016 Standard KB4534271
Microsoft Windows Server 2008 R2 Standard KB4534314
Microsoft Windows Server 2012 Standard KB4354977
Microsoft Windows Server 2012 Standard KB4534288
Microsoft Windows Server 2012 R2 Standard KB4534309
Microsoft® Windows Server® 2008 Standard KB4534312
Microsoft Windows Server 2008 R2 Standard KB4534876
Microsoft® Windows Server® 2008 Standard KB4537822
Microsoft Windows Server 2016 Standard KB4537759
Microsoft Windows Server 2008 R2 Standard KB4537813
Microsoft Windows Server 2012 R2 Standard KB4537803
Microsoft Windows Server 2016 Standard KB4537764
Microsoft Windows Server 2012 Standard KB4537794
Microsoft Windows Server 2016 Standard KB4537762
PS C:\Scripts> $patchesToVerify.operating_system
Microsoft Windows Server 2012 R2 Standard
Microsoft Windows Server 2016 Standard
Microsoft� Windows Server� 2008 Standard
Microsoft Windows Server 2012 Standard
Microsoft Windows Server 2008 R2 Standard
Microsoft Windows Server 2016 Standard
Microsoft Windows Server 2016 Standard
Microsoft Windows Server 2016 Standard
Microsoft� Windows Server� 2008 Standard
Microsoft Windows Server 2012 R2 Standard
Microsoft� Windows Server� 2008 Standard
Microsoft Windows Server 2016 Standard
Microsoft Windows Server 2008 R2 Standard
Microsoft Windows Server 2012 Standard
Microsoft Windows Server 2012 Standard
Microsoft Windows Server 2012 R2 Standard
Microsoft� Windows Server� 2008 Standard
Microsoft Windows Server 2008 R2 Standard
Microsoft� Windows Server� 2008 Standard
Microsoft Windows Server 2016 Standard
Microsoft Windows Server 2008 R2 Standard
Microsoft Windows Server 2012 R2 Standard
Microsoft Windows Server 2016 Standard
Microsoft Windows Server 2012 Standard
Microsoft Windows Server 2016 Standard
$RS_W32OSCaption = @(Get-WmiObject win32_operatingsystem -ComputerName $computername | Select-Object caption).Caption
$KBs = ($patchesToVerify |Where-Object {$_.operating_system -eq $RS_W32OSCaption} | Select-Object KB_Article).kb_article
it is giving empty output.
Please help
Thanks,
Naveen