Home Reference WMI Reference root CIMV2 Win32_NetworkLoginProfile
 

Win32_NetworkLoginProfile

The Win32_NetworkLoginProfile class represents the network login information of a particular user on a Win32 system. This includes, but is not limited to, password status, access privileges, disk quotas, and login directory paths.

Quick Start

Properties

In this WMI class, all WMI properties are read-only. You can only read values but not change them.

AccountExpires

Data type DateTime

The AccountExpires property specifies when the account will expire. This value is calculated from the number of seconds elapsed since 00:00:00, January 1, 1970, and is set in this format: yyyymmddhhmmss.mmmmmm sutc.

Example: 20521201000230.000000 000

ActivationInterval

Data type UInt32

AuthorizationFlags

Data type UInt32

The AuthorizationFlags property contains a set of flags that specify the resources a user is authorized to use or modify.

$Printer=1
$Communication=2
$Server=4
$Accounts=8

$AuthorizationFlags = $Accounts + $Communication

BadPasswordCount

Data type UInt32

The BadPasswordCount property indicates the number of times the user enters a bad password when logging on to a Win32 system.

Example: 0

Caption

Data type String

A short textual description (one-line string) of the CIM_Setting object.

CodePage

Data type UInt32

The CodePage property specifies the code page for the user’s language of choice. A code page is the character set used.

Comment

Data type String

The Comment property contains a comment or description for this login profile.

CountryCode

Data type UInt32

The CountryCode property specifies the country/region code for the user’s language of choice.

Description

Data type String

A textual description of the CIM_Setting object.

Flags

Data type UInt32

The Flags property indicates the properties available to this network profile. Properties that can be set include:

$Script=1
$AccountDisabled=2
$HomeDirRequired=4
$Lockout=8
$PasswordNotRequired=16
$PaswwordCantChange=32
$EncryptedTestPasswordAllowed=64
$TempDuplicateAccount=128
$NormalAccount=256
$InterDomainTrustAccount=512
$WorkStationTrustAccount=1024
$ServerTrustAccount=2048
$DontExpirePassword=4096
$MNSLogonAccount=8192
$SmartcardRequired=16384
$TrustedForDelegation=32768
$NotDelegated=65536
$UseDESKeyOnly=131072
$DontRequirePreauthorization=262144
$PasswordExpired=524288

$Flags = $UseDESKeyOnly + $PaswwordCantChange

FullName

Data type String

The FullName property indicates the full name of the user belonging to the network login profile. This string can beempty if the user chooses not to associate a full name with a user name.

HomeDirectory

Data type String

The HomeDirectory property specifies the path to the home directory of the user. This string may be empty if the user chooses not to specify a home directory.

Example: \HOMEDIR

HomeDirectoryDrive

Data type String

The HomeDirectoryDrive property specifies the drive letter assigned to the user’s home directory for logon purposes.

Example: C:

LastLogoff

Data type DateTime

The LastLogoff property specifies the date and time the user last logged off the system. This value is calculated from the number of seconds elapsed since 00:00:00, January 1, 1970. A value of zero means that the last logoff time is unknown. The format of this value is yyyymmddhhmmss.mmmmmm sutc.

Example: 19521201000230.000000 000

LastLogon

Data type DateTime

The LastLogon property indicates the date and time the user last logged on to the system. This value is calculated from the number of seconds elapsed since 00:00:00, January 1, 1970. The format of this value is yyyymmddhhmmss.mmmmmm sutc.

Example: 19521201000230.000000 000

LogonHours

Data type String

The LogonHours property specifies the times during the week when the user can log on. Each bit represents a unit of time specified by the UnitsPerWeek member. For instance, if the unit of time is hourly, the first bit (bit 0, word 0) is Sunday, 0:00 to 0:59; the second bit (bit 1, word 0) is Sunday, 1:00 to 1:59; and so on. If this member is set to NULL, then there is no time restriction. The time is set to GMT and must be adjusted for other time zones (for example, GMT minus 8 hours for PST).

LogonServer

Data type String

The LogonServer property contains the name of the server to which logon requests are sent. Server names should be preceded by two backslashes (\\). A server name with an asterisk (\\*) indicates that the logon request can be handled by any logon server. A null string indicates that requests are sent to the domain controller.

Example: \\MyServer

MaximumStorage

Data type UInt64

The MaximumStorage property specifies the maximum amount of disk space available to the user. If MaximumStorage is set to USER_MAXSTORAGE_UNLIMITED the user is allowed to use all available disk space.

Example: 10000000

Name

Data type String

The Name property specifies the name of the user account on a particular domain or machine. The number of characters in the name cannot exceed the value of UNLEN.

Example: somedomain\johndoe

NumberOfLogons

Data type UInt32

The NumberOfLogons property indicates the number of successful times the user tried to log on to this account. A value of 0xFFFFFFFF indicates that the value is unknown. This property is maintained separately on each backup domain controller (BDC) in the domain. To get an accurate value only the largest value from all BDCs should be used.

Example: 4

Parameters

Data type String

The Parameters property contains space set aside for use by applications. This string can be null, or it can have any number of characters before the terminating null character. Microsoft products use this member to store user configuration information. Do not modify this information because this value is specific to an application.

PasswordAge

Data type DateTime

The PasswordAge property indicates the length of time a password has been in effect. This value is measured from the number of seconds elapsed since the password was last changed.

Example: 00001201000230.000000 000

PasswordExpires

Data type DateTime

The PasswordExpires property indicates the date and time when the password will expire. The value is set in this format: yyyymmddhhmmss.mmmmmm sutc

Example: 19521201000230.000000 000

PrimaryGroupId

Data type UInt32

The PrimaryGroupId property specifies the relative ID (RID) of the Primary Global Group for this user. The identifier verifies the primary group to which the user’s profile belongs.

Privileges

Data type UInt32

The privileges property specifies the level of privilege assigned to the usri3_name property.

Profile

Data type String

The Profile property specifies a directory path to the user’s profile. This value can be a null string, a local absolute path, or a UNC path. A user profile contains settings that are customizable for each user such as the desktop colors.

Example: C:\Winnt

ScriptPath

Data type String

The ScriptPath property indicates the directory path to the user’s logon script. A logon script automatically executes a set of commands each time a user logs on to a system.

Example: C:\win\profiles\ThomasSteven

SettingID

Data type String

The identifier by which the CIM_Setting object is known.

UnitsPerWeek

Data type UInt32

The UnitsPerWeek property indicates the number of time units the week is divided into. It is used with the LogonHours property to limit user access to the computer.

Example: 168 (hours per week

UserComment

Data type String

The UserComment property contains a user defined comment or description for this profile.

UserId

Data type UInt32

The UserId property specifies the relative ID (RID) of the user. The identifier verifies that the user exists and is unique to this domain.

UserType

Data type String

The UserType property indicates the type of account the user has privileges to.

'Normal Account','Duplicate Account','Workstation Trust Account','Server Trust Account','Interdomain Trust Account','Unknown'

Workstations

Data type String

The Workstations property contains the names of workstations from which the user can log on. Up to eight workstations can be specified; the names must be separated by commas (,). A null string indicates no restrictions. To disable logons from all workstations to this account, set the UF_ACCOUNTDISABLE in the Flags property of this class.

Methods

Examples

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.

Content last updated: 2013-12-27 12:27:06 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin