Monday, March 23, 2009

OS Language VB Script

VB Script to get language of the operating system of our computer accounts in Active Directory.


Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
Wscript.Echo "OS Language: " & objOperatingSystem.OSLanguage
Next

No comments:

Post a Comment

 
span.fullpost {display:inline;}