external help file | Module Name | online version | schema |
---|---|---|---|
Win32_UserProfile.cdxml-help.xml |
userprofile |
2.0.0 |
Gets user profile objects from local or remote systems.
Get-UserProfile [-LocalPath <String[]>] [-Before <DateTime>] [-Status <Status[]>] [-Loaded <Boolean[]>]
[-Roaming <Boolean[]>] [-Special <Boolean[]>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob]
[<CommonParameters>]
Get-UserProfile -SID <String[]> [-Before <DateTime>] [-Status <Status[]>] [-Loaded <Boolean[]>]
[-Roaming <Boolean[]>] [-Special <Boolean[]>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob]
[<CommonParameters>]
The Get-UserProfile cmdlet retrieves the specified user profile and its properties. If you do not specify a profile name, the cmdlet returns a list of all user profiles.
PS C:\> Get-UserProfile
This example receives all user profiles from local computer
PS C:\> $loadedBefore = (Get-Date).AddDays(-90)
PS C:\> Get-Userprofile -Before $loadedBefore
This example retreives all user profiles that are not used for 3 months (90 days)
PS C:\> Get-AdUser Joe | Get-UserProfile
This example retrieves the AD user Joe's profile.
PS C:\> Get-CimInstance Win32_UserAccount "name='localuser'" | Get-UserProfile
This example retrieves local user's profile.
Specifies a path to one or more user profiles. Wildcards are permitted.
Type: String[]
Parameter Sets: ByPath
Aliases: Path
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: True
Specifies profile owner Security ID (SID). Wildcards are permitted.
Type: String[]
Parameter Sets: BySID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
Specifies the status of the user profiles being enumerated.
Type: Status[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies whether the returned user profiles should include currently loaded ones (or not)
Type: Boolean[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies whether the returned user profiles should include roaming profiles (or not)
Type: Boolean[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies whether the returned user profiles should include these that are owned by a special system service.
Type: Boolean[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: CimSession[]
Parameter Sets: (All)
Aliases: Session
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Gets only the user profiles that has been loaded before the specified date and time. Enter a DateTime object, such as the one returned by the Get-Date cmdlet.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
User Profile CIM object
The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.