Hi @Testa ,
You could use SCCM or WSUS to automate patch management process. In regards to powershell there is a command get-hotfix which simple display all patches applied.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-hotfix?view=powershell-7.2