Get-SCSMUser

Retrieves users that are defined in Service Manager.

Syntax

Get-SCSMUser [[-DisplayName] <String[]>] [-ComputerName <String[]>] [-Credential <PSCredential>]
 [-SCSession <Connection[]>] [<CommonParameters>]
Get-SCSMUser [-Id] <Guid[]> [-ComputerName <String[]>] [-Credential <PSCredential>] [-SCSession <Connection[]>]
 [<CommonParameters>]
Get-SCSMUser [-Name] <String[]> [-ComputerName <String[]>] [-Credential <PSCredential>]
 [-SCSession <Connection[]>] [<CommonParameters>]

Description

The Get-SCSMUser cmdlet retrieves users that are defined in Service Manager. Depending on the configuration of the system, the users can be a collection of Windows Active Directory users, and users that are defined in other operating systems, such as UNIX.

Examples

Example 1: Get available User objects in Service Manager

PS C:\>Get-SCSMUser
The properties displayed are FirstName, LastName, Domain, and UserName
FirstName   LastName    Domain      UserName
----------  ---------   -------     ---------
David       Chew        SMInternal  David.Chew

This command retrieves User objects that are available in Service Manager.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Type:String[]
Required:False
Position:Named
Default value:Localhost
Accept pipeline input:False
Accept wildcard characters:False
-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:PSCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Specifies the display name of the user to retrieve. You can specify a regular expression.

Type:String[]
Required:False
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Id

Specifies the ID of the user to retrieve.

Type:Guid[]
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the user to retrieve. You can specify a regular expression

Type:String[]
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SCSession

Specifies an object that represents the session to a Service Manager management server.

Type:Connection[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

You can pipe a name to the *DisplayName* parameter.

Inputs

System.Guid

You can pipe a GUID to the *Id* parameter.

Outputs

Microsoft.AD.User

This cmdlet returns a **User** object that provides the information about the Service Manager **User**. This object can be used in conjunction with the Update-SCSMUserRole cmdlet to add a user to a user role.

Outputs

Microsoft.AD.Group

Outputs

System.Domain.User