New-SCADConnector

Creates a new Service Manager Active Directory connector.

Syntax

New-SCADConnector
   [[-Description] <String>]
   [-Enable <Boolean>]
   [-DisplayName] <String>
   [[-QueryRoot] <String>]
   [-PassThru]
   [-ComputerFilter <String>]
   [-UserFilter <String>]
   [-PrinterFilter <String>]
   -ADCredential <PSCredential>
   [[-RunAsAccount] <ManagementPackSecureReference>]
   [-ScheduleDay <DaySchedule>]
   [-ScheduleHour <Int32>]
   [-SyncNow]
   [-ExpandGroups]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [-WhatIf]
   [-Confirm]
   [<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:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:True
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:System.String
Position:Named
Default value:None
Required:False
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:System.String[]
Position:Named
Default value:Localhost
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required: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:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description for the connector.

Type:System.String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name property of the connector.

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

-Enable

Indicates whether this cmdlet enables or disables the connector.

Type:System.Boolean
Position:Named
Default value:True
Required:False
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:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
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:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
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:System.String
Position:Named
Default value:None
Required:False
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:System.String
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsAccount

Specifies the RunAs account to use when using this connector.

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPackSecureReference
Position:3
Default value:Operational System Account
Required:False
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:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Connectors.DaySchedule
Accepted values:Daily, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Position:Named
Default value:Daily
Required:False
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:System.Int32
Position:Named
Default value:2
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SCSession

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

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

-SyncNow

Causes the Active Directory connector to start a synchronization cycle.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
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:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required: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.