RE: [ActiveDir] OT (Sort of): Determining the Edition of Windows Installed
Thanks for all the very quick responses. Managed to churn out the reports with minutes to spare *grin* Glenn. List info : http://www.activedir.org/mail_list.htm List FAQ: http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
RE: [ActiveDir] OT (Sort of): Determining the Edition of Windows Installed
Hi Glenn, Did you used wmi to get this information ? Use below script to determine edition --- On Error Resume Next strComputer = . Set objWMIService = GetObject(winmgmts:\\ strComputer \root\cimv2) Set colItems = objWMIService.ExecQuery(Select * from Win32_OperatingSystem,,48) For Each objItem in colItems Wscript.Echo Caption: objItem.Caption Next - Above script will give edition for local PC. IF you want to get edition of remote PC's then replace . value in strComputer with hostname. If you need to get edition for large numbers of servers/desktops then let me know, I will send you another script, just you need input text file with all servers and desktops details. Script will pop up required information in a excel sheet. -dinesh -Original Message- From: Glenn Corbett [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:05 PM To: [EMAIL PROTECTED] Subject: [ActiveDir] OT (Sort of): Determining the Edition of Windows Installed All, We are currently undergoing our MS Licensing Upgrade (ugh), and one of the things I need to know is which version and which edition of windows server is running on a particular machine. Getting the version number from the registry is fairly easy, and I've already configured MS Ops Manager to get this information. Determining the edition (server, advanced server etc) is proving a bit more difficult. I've used The AD Cookbook (thanks Robbie) and got the basic list of servers (Windows 2000 v Windows 2003), now just need to work out what edition of windows is running on them. Any idea how to quickly retrieve this information ? TIA Glenn List info : http://www.activedir.org/mail_list.htm List FAQ: http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com
RE: [ActiveDir] OT (Sort of): Determining the Edition of Windows Installed
This is what I use -- most from the Technet scripting site and Robbie's book, I'd guess... Function OperatingSystemVersion (node) Dim objWmiService, colOperatingSystems, objOperatingSystem Dim iRetry On Error Resume Next For iRetry = 0 To 5 Set objWMIService = Nothing Set colOperatingSystems = Nothing Err.Clear Set objWMIService = GetObject(winmgmts: _ {impersonationLevel=impersonate}!\\ node \root\cimv2) If Err.Number = 0 Then Set colOperatingSystems = objWMIService.ExecQuery _ (Select * from Win32_OperatingSystem) For Each objOperatingSystem in colOperatingSystems If Len (OperatingSystemVersion) 0 Then OperatingSystemVersion = OperatingSystemVersion vbCrLf OperatingSystemVersion = OperatingSystemVersion objOperatingSystem.Caption objOperatingSystem.Version Set objWMIService = Nothing Set colOperatingSystems = Nothing Exit Function Next Else wscript.Echo Error binding to root\cimv2 for node , Err.Description ( Hex(Err.Number) ) End If Next Set objWMIService = Nothing Set colOperatingSystems = Nothing OperatingSystemVersion = unknown End Function -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Corbett Sent: Thursday, June 17, 2004 4:35 AM To: [EMAIL PROTECTED] Subject: [ActiveDir] OT (Sort of): Determining the Edition of Windows Installed All, We are currently undergoing our MS Licensing Upgrade (ugh), and one of the things I need to know is which version and which edition of windows server is running on a particular machine. Getting the version number from the registry is fairly easy, and I've already configured MS Ops Manager to get this information. Determining the edition (server, advanced server etc) is proving a bit more difficult. I've used The AD Cookbook (thanks Robbie) and got the basic list of servers (Windows 2000 v Windows 2003), now just need to work out what edition of windows is running on them. Any idea how to quickly retrieve this information ? TIA Glenn List info : http://www.activedir.org/mail_list.htm List FAQ: http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ: http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/