Come and Check our BETA Alpha version of Powershellcenter.net
Send me your comment to Powershell@powershellcenter.com

Synopsis

Updates certain settings of the Active Directory agent assignment.

Syntax

Update-SCOMADAgentAssignment [[-LdapQuery] <String>] [-ComputerName <String[]>] [-Credential <PSCredential>] [-Exclude <String[]>] [-PassThru [<SwitchParameter>]] [-SCSession <Connection[]>] -AgentAssignment <AgentAssignment> -PrimaryServer <ManagementServer> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

Detailed Description

The Update-SCOMADAgentAssignment cmdlet updates certain settings of the Active Directory agent assignment. Only the LDAP query and exclusion list can be modified. To make other changes, the agent assignment must be deleted and re-created.

Parameters

-AgentAssignment [<AgentAssignment>]

The AD agent assignment.

Required?   true
Position?   named
Default value?  
Accept pipeline input?   true (ByValue)
Accept wildcard characters?   false

-ComputerName [<String[]>]

Specifies a computer to establish a connection with. The computer must be running the System Center Data Access service. The default is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name. To specify the local computer, type the computer name, "localhost", or a dot (.).

Required?   false
Position?   named
Default value?  
Accept pipeline input?   true (ByValue)
Accept wildcard characters?   false

-Credential [<PSCredential>]

Specifies a user account under which the management group connection will run. It must have access to the server that is specified in the ComputerName parameter if specified. The default is the current user.

Enter a PSCredential object, such as one that is returned by the Get-Credential cmdlet.

Required?   false
Position?   named
Default value?  
Accept pipeline input?   true (ByValue)
Accept wildcard characters?   false

-Exclude [<String[]>]

The new list of computers to exclude, even if they are returned by the LDAP query. The existing exclusion list will be kept if this parameter is omitted.

Required?   false
Position?   named
Default value?  
Accept pipeline input?   false
Accept wildcard characters?   false

-LdapQuery [<String>]

The new LDAP query. The existing LDAP query will be kept if this parameter is omitted.

Required?   false
Position?   3
Default value?  
Accept pipeline input?   false
Accept wildcard characters?   false

-PassThru [<SwitchParameter>]

If specified, the agent assignment will be returned to the pipeline.

Required?   false
Position?   named
Default value?  
Accept pipeline input?   false
Accept wildcard characters?   false

-PrimaryServer [<ManagementServer>]

The primary management server used for the agent assignment being updated. This parameter is automatically populated when you pipe input from Get-SCOMADAgentAssignment.

Required?   true
Position?   named
Default value?  
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-SCSession [<Connection[]>]

Specifies a connection to a management server. The default is the current management group connection.

Enter a Management group connection object, such as one returned by the Get-SCManagementGroupConnection cmdlet.

Required?   false
Position?   named
Default value?  
Accept pipeline input?   true (ByValue)
Accept wildcard characters?   false

-Confirm [<SwitchParameter>]

Prompts you for confirmation before executing the command.

Required?   false
Position?   named
Default value?  
Accept pipeline input?   false
Accept wildcard characters?   false

-WhatIf [<SwitchParameter>]

Describes what would happen if you executed the command without actually executing the command.

Required?   false
Position?   named
Default value?  
Accept pipeline input?   false
Accept wildcard characters?   false

Input Type

Return Type

Notes

Examples

EXAMPLE 1

PS> PS C:\>Get-SCOMADAgentAssignment -Domain "contoso.com" | Update-SCOMADAgentAssignment -LdapQuery '(&amp;(sAMAccountType=805306369)(name=SQLSERVER*))'

This command updates the LDAP query of an Active Directory agent assignment for domain contoso.com to return only computers with names matching "SQLSERVER*".