Computer Domain WMI
2
Get the computer domain with wmi
Function GetComputerDomain()
On Error Resume Next
Set OpSysSet = GetObject("winmgmts:\root\cimv2").ExecQuery("select * from Win32_ComputerSystem")
for each i in OpSysSet
' There should only be one anyway, but we'll do this to be sure to be sure.
GetComputerDomain = i.Domain
next
End Function






There are currently no comments for this snippet.