The error you get with Get-ComputerInfo is a known issue on a Windows 7 platform.
See Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'." · Issue #3023 · PowerSh…
You should be able to get the OS name with
Get-CimInstance -ClassName Win32_OperatingSystem | select Caption
can you please suggest how patch management can be done with powershell.
lets say we need to deploy security patch to 100 windows vm.
Have a look at the PSWindowsUpdate module.
There are some sample scenarios in Install Windows updates remotely with the PowerShell
There are commercial alternatives for managing Windows Updates (think SCCM)
while i am checking this can powershell fully replace comercial alternatives like sccm or any other tool .
on a very high level i am imagining as a simple task of creating a for loop and puchpatches .however iam checking the articles yu mentioned.
Yes, with the module I linked to (and the sample scenario in the other link).