Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI Performance Counters » VBScript

NetworkLoginProfile - WMI sample in VBScript

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The NetworkLoginProfile WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


NetworkLoginProfile

Example(s)

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_NetworkLoginProfile")

For Each objItem in colItems
	WScript.Echo "AccountExpires:" & objItem.AccountExpires
	WScript.Echo "AuthorizationFlags:" & objItem.AuthorizationFlags
	WScript.Echo "BadPasswordCount:" & objItem.BadPasswordCount
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "CodePage:" & objItem.CodePage
	WScript.Echo "Comment:" & objItem.Comment
	WScript.Echo "CountryCode:" & objItem.CountryCode
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "Flags:" & objItem.Flags
	WScript.Echo "FullName:" & objItem.FullName
	WScript.Echo "HomeDirectory:" & objItem.HomeDirectory
	WScript.Echo "HomeDirectoryDrive:" & objItem.HomeDirectoryDrive
	WScript.Echo "LastLogoff:" & objItem.LastLogoff
	WScript.Echo "LastLogon:" & objItem.LastLogon
	WScript.Echo "LogonHours:" & objItem.LogonHours
	WScript.Echo "LogonServer:" & objItem.LogonServer
	WScript.Echo "MaximumStorage:" & objItem.MaximumStorage
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "NumberOfLogons:" & objItem.NumberOfLogons
	WScript.Echo "Parameters:" & objItem.Parameters
	WScript.Echo "PasswordAge:" & objItem.PasswordAge
	WScript.Echo "PasswordExpires:" & objItem.PasswordExpires
	WScript.Echo "PrimaryGroupId:" & objItem.PrimaryGroupId
	WScript.Echo "Privileges:" & objItem.Privileges
	WScript.Echo "Profile:" & objItem.Profile
	WScript.Echo "ScriptPath:" & objItem.ScriptPath
	WScript.Echo "SettingID:" & objItem.SettingID
	WScript.Echo "UnitsPerWeek:" & objItem.UnitsPerWeek
	WScript.Echo "UserComment:" & objItem.UserComment
	WScript.Echo "UserId:" & objItem.UserId
	WScript.Echo "UserType:" & objItem.UserType
	WScript.Echo "Workstations:" & objItem.Workstations
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""
Next