I need to trap the Count value of 2 into a Count variable - how can I perform this? The idea in this example is to loop continuously until two hotfixes are installed - which means I can perform a service restart.
C:\WINDOWS\system32> Get-HotFix |? installedon -gt 4/13/2022 | Group installedon –NoElement
Count Name
----- ----
2 4/14/2022 12:00:00 AM