New-SCADConnector

Creates a Service Manager Active Directory connector.

Syntax

New-SCADConnector [-DisplayName] <String> [[-Description] <String>] [[-QueryRoot] <String>]
 [[-RunAsAccount] <ManagementPackSecureReference>] -ADCredential <PSCredential> [-ComputerFilter <String>]
 [-ComputerName <String[]>] [-Confirm] [-Credential <PSCredential>] [-Enable <Boolean>] [-ExpandGroups]
 [-PassThru] [-PrinterFilter <String>] [-SCSession <Connection[]>] [-ScheduleDay <DaySchedule>]
 [-ScheduleHour <Int32>] [-SyncNow] [-UserFilter <String>] [-WhatIf] [<CommonParameters>]

Description

The New-SCADConnector cmdlet creates a Service Manager Active Directory connector.

The following parameters are only available if you have applied Service Manager 2012 R2 Update Rollup 6 or later versions.

- ScheduleDay

  • ScheduleHour

Examples

Example 1: Create a connector to the local domain

PS C:\>$RunAsAccount = Get-SCSMRunAsAccount -DisplayName "Workflow Account"
PS C:\> $Credential = Get-Credential
PS C:\> New-SCADConnector -DisplayName "Contoso AD Connector" -Description "Contoso AD Connector" -QueryRoot "LDAP://DC=Contoso,DC=com" -RunAsAccount $RunAsAccount -ADCredential $Credential -Enable $False -ScheduleDay Sunday -ScheduleHour 3

The first command gets a Run As account for Workflow Account by using the Get-SCSMRunAsAccount cmdlet. The command stores the result in the $RunAsAccount variable.

The second command prompts you for credentials by using the Get-Credential cmdlet, and then stores the credentials in the $Credential variable.

The final command creates an Active Directory connector to the local domain, which retrieves all computers, printers, users, and user groups. The connector is configured to synchronize every Sunday at 3:00 A.M.

Example 2: Create a connector to the local domain that includes a user filter

PS C:\>$RunAsAccount = Get-SCSMRunAsAccount -DisplayName "Workflow Account"
PS C:\> $Credential = Get-Credential
PS C:\> New-SCADConnector -DisplayName "Contoso AD Connector" -Description "Contoso users starting with E" -QueryRoot "LDAP://DC=Contoso,DC=com" -RunAsAccount $RunAsAccount -ADCredential $Credential -Enable $False -UserFilter "(givenname=E*)"

The first command gets a Run As account for Workflow Account, and then stores it in the $RunAsAccount variable.

The second command prompts you for credentials by using the Get-Credential cmdlet, and then stores the credentials in the $Credential variable.

The final command creates an Active Directory connector to the local domain which retrieves only the user accounts that start with the letter E.

Parameters

-ADCredential

Specifies the credential to use when this cmdlet connects to the domain controller.

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

Specifies a filter that selects the computers that the connector synchronizes. The filter must be specified as an Active Directory filter. For example, the following filter includes all computers which begin with win in the synchronization:

(name=win*)

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
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
-Description

Specifies a description for the connector.

Type:String
Required:False
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Specifies the display name property of the connector.

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

Indicates whether this cmdlet enables or disables the connector.

Type:Boolean
Required:False
Position:Named
Default value:True
Accept pipeline input:False
Accept wildcard characters:False
-ExpandGroups

Specifies that this cmdlet recursively includes members of the groups that are specified by the UserFilter parameter.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Indicates that this cmdlet returns the Active Directory connector that it creates. You can pass this object to other cmdlets.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrinterFilter

Specifies a filter that this cmdlet uses to select the printers that the connector synchronizes.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-QueryRoot

Specifies the Active Directory folder from which this cmdlet queries objects, such as LDAP://DC=scsm,DC=stbtest,DC=microsoft,DC=com.

Type:String
Required:False
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsAccount

Specifies the RunAs account to use when using this connector.

Type:ManagementPackSecureReference
Required:False
Position:3
Default value:Daily
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
-ScheduleDay

Specifies the day of the week on which the connector synchronizes. Valid values are:

- Daily

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

Type:DaySchedule
Parameter Sets:Daily, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Required:False
Position:Named
Default value:Daily
Accept pipeline input:False
Accept wildcard characters:False
-ScheduleHour

Specifies the hour at which the connector starts synchronization. The value must be a number from zero (0) to 23.

Type:Int32
Required:False
Position:Named
Default value:2
Accept pipeline input:False
Accept wildcard characters:False
-SyncNow

Causes the Active Directory connector to start a synchronization cycle.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserFilter

Specifies the filter that is used to select the users to by synchronized by the connector. You must specify the value in the form of an Active Directory filter. For example, the following value for this parameter includes in the synchronization users whose givenName starts with a:

(givenname=a*)

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.