I am writing a script to compare 2 csv files to get the outdated software’s and put them into another csv file. I have a problem when I try to get the outdated softwares, it just shows all the softwares installed again. This is my script. $CurrentList = Import-csv C:\Users\Administrator\CSVReports\InstalledSoftware.csv | select ComputerName, DisplayName, DisplayVersion, […]
- Tags displayName, DisplayVersion, I am writing a script to compare 2 csv files to get the outdated software's and put them into another csv file. I have a problem when I try t, it just shows all the softwares installed again. This is my script. $CurrentList = Import-csv C:\Users\Administrator\CSVReports\InstalledSof, LLC ApprovedList.csv DisplayName DisplayVersion Publisher Google Chrome 87.0.4280.88 Google LLC VmWare Tools 10.3.5.104, LLC Only chrome should be in the OutDatedSoftware csv as only the chrome version is different but I get all the softwares. I also want to kn, LLC Win2012R2 Google Chrome 86.0.4280.88 Google LLC Win2012R2 VmWare Tools 10.3.5.10430147 VMWare, LLC Win2016 Google Chrome 86.0.4280.88 Google LLC Win2016 VmWare Tools 10.3.5.10430147 VMWare, Publisher -PassThru | Where Sideindicator -eq '<=' $Outdated = $Outdated | Foreach { $Item = $_ $ApprovedVersion = $ApprovedList | Where {$_, Publisher $ApprovedList = $ApprovedList | select ComputerName, Publisher $ApprovedList = Import-csv C:\Users\Administrator\ApprovedSoftware\ApprovedSoftwareList.csv | select DisplayName, Publisher $Outdated = Compare-Object -ReferenceObject $CurrentList -DifferenceObject $ApprovedList -Property DisplayName