- WMI Library -
WMI Libraly > Win32_UserProfile Class

Win32_UserProfile Class

The Win32_UserProfile class contains information about user profiles on a Windows system.
Namespace value is root/CIMV2.
WMI Provider value is UserProfileProvider.


Properties

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

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

  • LastUseTime
  • This property indicates when this profile is used last time.

  • Loaded
  • This property indicates whether this profile is loaded.

  • LocalPath
  • This property contains the user profile's path on the local computer.

  • RefCount
  • 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
  • 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
  • This property contains the user's roaming profile path if RoamingConfigured is true.

  • RoamingPreference
  • 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.


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

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

  • Status
  • 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.



    Methods

  • ChangeOwner
  • Change a user profile's owner to another user, the result value is HRESULT


    Example WQL

    SELECT * FROM Win32_UserProfile
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...