VMware Cloud Community
jvm2016
Hot Shot
Hot Shot
Jump to solution

getting os info_powershell

Hi Luc,

i have been trying to find os information using following two commands on windows machine.

get-computerinfo which throws folowing error .

pastedImage_1.png

and using

Get-CimInstance -ClassName Win32_OperatingSystem   but i dont find any property to find the version of windows(whether 2008,2012 etc..)

can  yusuggest where is the direct property in above???

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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'." · I...

You should be able to get the OS name with

Get-CimInstance -ClassName Win32_OperatingSystem  | select Caption


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

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'." · I...

You should be able to get the OS name with

Get-CimInstance -ClassName Win32_OperatingSystem  | select Caption


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

can you please suggest how patch management can be done with powershell.

lets say we need to deploy security patch to 100 windows vm.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

jvm2016
Hot Shot
Hot Shot
Jump to solution

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.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, with the module I linked to (and the sample scenario in the other link).


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

thnaksLuc .

Reply
0 Kudos