Contact Info

Crumbtrail

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

UserProfile - 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 UserProfile WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


UserProfile

Example(s)

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

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

For Each objItem in colItems
	WScript.Echo "AppDataRoaming:" & objItem.AppDataRoaming
	WScript.Echo "Contacts:" & objItem.Contacts
	WScript.Echo "Desktop:" & objItem.Desktop
	WScript.Echo "Documents:" & objItem.Documents
	WScript.Echo "Downloads:" & objItem.Downloads
	WScript.Echo "Favorites:" & objItem.Favorites
	WScript.Echo "HealthStatus:" & objItem.HealthStatus
	WScript.Echo "LastAttemptedProfileDownloadTime:" & objItem.LastAttemptedProfileDownloadTime
	WScript.Echo "LastAttemptedProfileUploadTime:" & objItem.LastAttemptedProfileUploadTime
	WScript.Echo "LastBackgroundRegistryUploadTime:" & objItem.LastBackgroundRegistryUploadTime
	WScript.Echo "LastDownloadTime:" & objItem.LastDownloadTime
	WScript.Echo "LastUploadTime:" & objItem.LastUploadTime
	WScript.Echo "LastUseTime:" & objItem.LastUseTime
	WScript.Echo "Links:" & objItem.Links
	WScript.Echo "Loaded:" & objItem.Loaded
	WScript.Echo "LocalPath:" & objItem.LocalPath
	WScript.Echo "Music:" & objItem.Music
	WScript.Echo "Pictures:" & objItem.Pictures
	WScript.Echo "RefCount:" & objItem.RefCount
	WScript.Echo "RoamingConfigured:" & objItem.RoamingConfigured
	WScript.Echo "RoamingPath:" & objItem.RoamingPath
	WScript.Echo "RoamingPreference:" & objItem.RoamingPreference
	WScript.Echo "SavedGames:" & objItem.SavedGames
	WScript.Echo "Searches:" & objItem.Searches
	WScript.Echo "SID:" & objItem.SID
	WScript.Echo "Special:" & objItem.Special
	WScript.Echo "StartMenu:" & objItem.StartMenu
	WScript.Echo "Status:" & objItem.Status
	WScript.Echo "Videos:" & objItem.Videos
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""
Next