Can someone help me? I would like to run a powershell script on a computer that tells me yes or no if updates were installed during a specific time frame and the way I wrote this, it keeps returning not installed. Any ideas please?
$hotfix1 = Get-HotFix |
Where
($_.InstalledOn -gt "10/13/2020" -AND $_.InstalledOn -lt "10/16/2020")
If ($hotfix1 -eq "True") {
write-host "Hotfix is installed"
}
else {
write-host "Hotfix is NOT installed"
}
Aucun commentaire:
Enregistrer un commentaire