Win32_UserProfile class

Represents information about a user profile on a Windows system.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

class Win32_UserProfile
{
  string                        SID;
  string                        LocalPath;
  boolean                       Loaded;
  uint32                    REF refCount;
  boolean                       Special;
  boolean                       RoamingConfigured;
  string                        RoamingPath;
  boolean                       RoamingPreference;
  uint32                        Status;
  DATETIME                      LastUseTime;
  DATETIME                      LastDownloadTime;
  DATETIME                      LastUploadTime;
  uint8                         HealthStatus;
  DATETIME                      LastAttemptedProfileDownloadTime;
  DATETIME                      LastAttemptedProfileUploadTime;
  DATETIME                      LastBackgroundRegistryUploadTime;
  Win32_FolderRedirectionHealth AppDataRoaming;
  Win32_FolderRedirectionHealth Desktop;
  Win32_FolderRedirectionHealth StartMenu;
  Win32_FolderRedirectionHealth Documents;
  Win32_FolderRedirectionHealth Pictures;
  Win32_FolderRedirectionHealth Music;
  Win32_FolderRedirectionHealth Videos;
  Win32_FolderRedirectionHealth Favorites;
  Win32_FolderRedirectionHealth Contacts;
  Win32_FolderRedirectionHealth Downloads;
  Win32_FolderRedirectionHealth Links;
  Win32_FolderRedirectionHealth Searches;
  Win32_FolderRedirectionHealth SavedGames;
};

Members

The Win32_UserProfile class has these types of members:

  • Methods
  • Properties

Methods

The Win32_UserProfile class has these methods.

Method Description
ChangeOwner

Changes the owner of a user profile.

 

Properties

The Win32_UserProfile class has these properties.

AppDataRoaming

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected AppData\Roaming folder.

Contacts

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Contacts folder.

Desktop

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Desktop folder.

Documents

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Documents folder.

Downloads

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Downloads folder.

Favorites

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Favorites folder.

HealthStatus

Data type: uint8

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the health status of the profile.

This property contains one of the following values

Healthy (0)

Unhealthy (1)

Caution (2)

Not Applicable (3)

LastAttemptedProfileDownloadTime

Data type: DATETIME

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

If this is a roaming profile, this property gets the last time an attempt was made to download the profile; otherwise this property is "0".

LastAttemptedProfileUploadTime

Data type: DATETIME

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

If this is a roaming profile, this property gets the last time an attempt was made to upload the profile; otherwise this property is "0".

LastBackgroundRegistryUploadTime

Data type: DATETIME

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

If this is a roaming profile, this property gets the last time the registry hive of the profile was uploaded; otherwise this property is "0".

LastDownloadTime

Data type: DATETIME

Access type: Read-only

Gets the last time that a roaming profile was downloaded from the server.

LastUploadTime

Data type: DATETIME

Access type: Read-only

Gets the last time that a roaming profile was uploaded to the server.

LastUseTime

Data type: DATETIME

Access type: Read-only

Gets the last time that the profile was used.

Links

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Links folder.

Loaded

Data type: boolean

Access type: Read-only

Indicates whether the user profile is loaded. True if the user profile is loaded; otherwise false.

LocalPath

Data type: string

Access type: Read-only

Gets the local path of the user profile.

Music

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Music folder.

Pictures

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Pictures folder.

refCount

Data type: uint32

Access type: Read-only

Gets the reference count of the profile. If the profile is loaded, the reference count is at least "1". Higher values indicate that more than one application or service has loaded the profile and is using it.

RoamingConfigured

Data type: boolean

Access type: Read-only

Indicates whether the owner of this user profile has roaming configured on any of their user profiles. True if the user has a roaming profile configured; otherwise false.

Note  If a user has a roaming profile configured, it does not mean that this profile is a roaming profile. Other policies and user preferences can prevent the profile from roaming. For more information, see the RoamingPreference and Status properties.

 

RoamingPath

Data type: string

Access type: Read-only

Gets the user's roaming profile path if the RoamingConfigured property is set to true.

RoamingPreference

Data type: boolean

Access type: Read-only

Indicates whether the user prefers to use this profile to roam if the RoamingConfigured property is set to true. By default, the RoamingPreference property is set to true and the roaming profile can roam between the local computer and the server. If the user sets this property to false to prevent roaming, the profile works like a local profile.

SavedGames

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Saved Games folder.

Searches

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Searches folder.

SID

Data type: string

Access type: Read-only

Qualifiers: Key

Gets the Security Identifier (SID) of the user who owns the user profile.

Special

Data type: boolean

Access type: Read-only

Indicates whether the user profile is owned by a special system service. True if the user profile is owned by a system service; otherwise false.

StartMenu

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Start Menu folder.

Status

Data type: uint32

Access type: Read-only

Gets a bit field that contains the status of the profile.

This property contains one or more of the following values:

Value Meaning
Undefined 0

The status of the profile is not set.

Temporary 1

The profile is a temporary profile and will be deleted after the user logs off.

Roaming 2

The profile is set to roaming. If this bit is not set, the profile is set to local.

Mandatory 4

The profile is a mandatory profile.

Corrupted 8

The profile is corrupted and is not in use. The user or administrator must fix the corruption to use the profile.

 

Videos

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2: This property is not available before Windows 8 and Windows Server 2012.

Gets the Win32_FolderRedirectionHealth object that contains the health status of the user's redirected Videos folder.

Examples

To use Win32_UserProfile to migrate a user to a new domain, see the following Vista’s MoveUser.exe replacement article on TechNet.

Requirements

Minimum supported client

Windows Vista with SP1

Minimum supported server

Windows Server 2008

Namespace

Root\CIMV2

MOF

UserProfileWmiProvider.mof

DLL

Profprov.dll

See also

UserProfileProvider Provider Classes