Set-SCXResourcePool

Set-SCXResourcePool

Changes the managing resource pool for the targeted managed UNIX and Linux computers.

Syntax

Parameter Set: FromResourcePoolParameterSetName
Set-SCXResourcePool [-Agent] <IPersistedUnixComputer[]> -ResourcePool <ManagementServicePool> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-SCXResourcePool cmdlet changes the managing resource pool for the targeted managed UNIX and Linux computers.

Parameters

-Agent<IPersistedUnixComputer[]>

Specifies one or more managed UNIX or Linux computer objects. For information about how to get a managed UNIX or Linux computer object, type Get-Help Get-SCXAgent.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies the name of a computer to establish a connection with. The computer must be running the System Center Data Access Service. The default value is the computer for the current management group connection. Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection will run. The default is the current user. Type a user name, such as "User01", "Domain01\User01", or "User@Domain.com", or enter a PSCredential object, such as one that is returned by the Get-Credential cmdlet. When you type a user name, you are prompted for a password. For more information, type Get-Help Get-Credential.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ResourcePool<ManagementServicePool>

Specifies a resource pool of servers, one of which is assigned to be the current management server and the other serving as backup management servers. This parameter requires a resource pool object and returns only the managed computers in that resource pool.

For information about how to get a resource pool object, type Get-Help Get-SCOMResourcePool.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies a connection.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command moves a single agent to the resource pool named ‘Pool 1’.

PS C:\> $MyPool = Get-SCOMResourcePool -DisplayName "Pool 1"
PS C:\> Get-SCXAgent –Name scxserver1.contoso.com | Set-SCXResourcePool -ResourcePool $MyPool

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command moves all UNIX and Linux agents from ‘Pool 1’ to ‘Pool 2’.

PS C:\> $MyPool1 = Get-SCOMResourcePool -DisplayName "Pool 1"
PS C:\> $MyPool2 = Get-SCOMResourcePool -DisplayName "Pool 2"
PS C:\> $MyAgents = Get-SCXAgent -ResourcePool $MyPool1
PS C:\> Set-SCXResourcePool -Agent $MyAgents -ResourcePool $MyPool2