Win32_UserProfile

The Win32_UserProfile class contains information about user profiles on a Windows system.

Quick Start

Properties

Most WMI properties are read-only. You can only read values but not change them. Few properties are also writeable. You can assign new values to those properties.

Writeable properties are marked with this icon:   

AppDataRoaming

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected AppData\Roaming folder.

Contacts

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Contacts folder.

Desktop

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Desktop folder.

Documents

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Documents folder.

Downloads

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Downloads folder.

Favorites

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Favorites folder.

HealthStatus

Data type UInt8

The health status of this profile, based on the values that were set in the Win32_RoamingUserHealthConfiguration properties.

$HealthStatus_ReturnValue = 
@{
    0='Healthy'
    1='Unhealthy'
    2='Caution'
    3='Not Applicable'
}

LastAttemptedProfileDownloadTime

Data type DateTime

If the profile is a roaming profile, this property is a DATETIME value that indicates the last time an attempt was made to download the profile from the server, even if it was unsuccessful. If the profile is a local profile, this property is zero.

LastAttemptedProfileUploadTime

Data type DateTime

If the profile is a roaming profile, this property is a DATETIME value that indicates the last time an attempt was made to upload the profile to the server, even if it was unsuccessful.

LastBackgroundRegistryUploadTime

Data type DateTime

If this profile is a roaming profile, this property is a DATETIME value that indicates the last time the profile’s registry hive was uploaded to the server.

LastDownloadTime

Data type DateTime

This property indicates when a roaming profile was downloaded from server last time.

LastUploadTime

Data type DateTime

This property indicates when a roaming profile was uploaded to server last time.

LastUseTime

Data type DateTime

This property indicates when this profile is used last time.

Links

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Links folder.

Loaded

Data type Boolean

This property indicates whether this profile is loaded.

LocalPath

Data type String

This property contains the user profile’s path on the local computer.

Music

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Music folder.

Pictures

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Pictures folder.

RefCount

Data type UInt32

This property indicates the ref count of the profile. If the profile is loaded, the ref count is at least 1.

Higher values indicates there are more than one applications or services has loaded the profile and using it.

RoamingConfigured

Data type Boolean

This property indicates whether the user has a roaming profile configured.

NOTE: User has a roaming profile configured does not mean that this profile is indeed roaming.

There are other policies and user preference can prevent the profile from roaming.

Please refer to the RoamingPreference and Status property.

RoamingPath

Data type String

This property contains the user’s roaming profile path if RoamingConfigured is $true.

  RoamingPreference

Data type Boolean

This property indicates whether the user prefer to roam this profile if RoamingConfigured is $true.

By default, this property will be $true to let the roaming profile roam between the local computer and the server.

User can set this property to $false to prevent roaming, then the profile will work like a local profile.

SavedGames

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Saved Games folder.

Searches

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Searches folder.

SID

Data type String

This property contains the SID of the user who owns this user profile.

Special

Data type Boolean

This property indicates whether this profile belongs to a special system service.

StartMenu

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Start Menu folder.

Status

Data type UInt32

May be one or more of the following:

0x00000001 – Indicate the profile is a temporary profile, it will be deleted at user logoff.

0x00000002 – Indicate the profile is now set to roaming, if this bit is not set, then it is set to local.

0x00000004 – Indicate the profile is a mandatory profile.

0x00000008 – Indicate the profile is a corrupted profile, and not in use, user or administrator must fix

the corruption in order to use this profile again.

$Temporary=1
$Roaming=2
$Mandatory=4
$Corrupted=8

$Status = $Corrupted + $Mandatory

Videos

Data type Object

A Win32_FolderRedirectionHealth object that represents the health of the user’s redirected Videos folder.

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:29:34 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin