Share via


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

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

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

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

Contacts

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

Desktop

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

Documents

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

Downloads

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

Favorites

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

HealthStatus

Data type: uint8

Access type: Read-only

The health status of the profile

This property contains one of the following values

Healthy (0)

Unhealthy (1)

Caution (2)

Not Applicable (3)

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

LastAttemptedProfileDownloadTime

Data type: DATETIME

Access type: Read-only

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

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

LastAttemptedProfileUploadTime

Data type: DATETIME

Access type: Read-only

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

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

LastBackgroundRegistryUploadTime

Data type: DATETIME

Access type: Read-only

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

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

LastDownloadTime

Data type: DATETIME

Access type: Read-only

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

LastUploadTime

Data type: DATETIME

Access type: Read-only

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

LastUseTime

Data type: DATETIME

Access type: Read-only

The last time that the profile was used.

Links

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

Loaded

Data type: boolean

Access type: Read-only

Whether the user profile is loaded. True if the user profile is loaded; otherwise false.

LocalPath

Data type: string

Access type: Read-only

The local path of the user profile.

Music

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

Pictures

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

refCount

Data type: uint32

Access type: Read-only

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

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

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

RoamingPreference

Data type: boolean

Access type: Read-only

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

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

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

Searches

Data type: Win32_FolderRedirectionHealth

Access type: Read-only

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

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

SID

Data type: string

Access type: Read-only

Qualifiers: Key

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

Special

Data type: boolean

Access type: Read-only

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

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

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

Status

Data type: uint32

Access type: Read-only

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

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

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

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