Set-SCOMResourcePool

Set-SCOMResourcePool

Changes the properties of a resource pool in Operations Manager.

Syntax

Parameter Set: Empty
Set-SCOMResourcePool [-ResourcePool] <ManagementServicePool[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-PassThru] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromAutoPopulate
Set-SCOMResourcePool [-ResourcePool] <ManagementServicePool[]> [-EnableAutomaticMembership] <Boolean> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-PassThru] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromMember
Set-SCOMResourcePool [-ResourcePool] <ManagementServicePool[]> [-Member] <ComputerHealthService[]> [-Action] <UpdateAction> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-PassThru] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromObserver
Set-SCOMResourcePool [-ResourcePool] <ManagementServicePool[]> [-Observer] <ComputerHealthService[]> [-Action <UpdateAction> ] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-PassThru] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-SCOMResourcePool cmdlet changes the properties of a resource pool in System Center 2012 – Operations Manager. A resource pool enables a collection of management servers to distribute the workload.

Parameters

-Action<UpdateAction>

Specifies an action to take. When updating the members of a resource pool, specify either Add or Remove.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. You can use NetBIOS names, IP addresses, or fully qualified domain names (FQDNs). 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 PSCredential object for the management group connection. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type "Get-Help Get-Credential".

If you specify a computer in the ComputerName parameter, use an account that has access to that computer. The default is the current user.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-EnableAutomaticMembership<Boolean>

Indicates that the cmdlet enables automatic membership for the resource pool. When set to $True, the resource pool contains all management servers, and membership in the pool is automatically managed. When set to $False, the resource pool can contain management servers, gateway management servers, or both, and membership in the pool is manually managed.

If you change the value from $True to $False, the membership of the pool remains the same until you manually update it.

If the value is changed from $False to $True, all members of the pool are removed, and then the pool is automatically repopulated with all management servers. The resource pool will be automatically updated as management servers are added and deleted from Operations Manager. This process can take some time to complete.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Member<ComputerHealthService[]>

Specifies an array of objects to include in the resource pool.

Valid members of a resource pool include management servers and gateway servers. For information about how to get a management server object, type "Get-Help Get-SCOMManagementServer".

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Observer<ComputerHealthService[]>

Specifies an array of management servers or gateway management servers that are not members of the resource pool.

To make a resource pool highly available, you must add a minimum of three members to the pool, or two members and one observer.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PassThru

Indicates that the cmdlet creates or modifies an object that a command can use in the pipeline. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ResourcePool<ManagementServicePool[]>

Specifies an array of resource pool objects. For information about how to get a resource pool object, type "Get-Help Get-SCOMResourcePool".

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCManagementGroupConnection cmdlet.

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: Add objects to a resource pool

This example changes the properties of a resource pool by adding objects to the resource pool.

The first command uses the Get-SCOMManagementServer cmdlet to get all management servers and stores them in the $Members variable.

The second command uses the Get-SCOMResourcePool cmdlet to get the resource pool with a display name of Pool01, and then uses the Set-SCOMResourcePool cmdlet to add the objects stored in the $Members variable to that resource pool.

PS C:\> $Members = Get-SCOMManagementServer
PS C:\> Get-SCOMResourcePool -DisplayName "Pool01" | Set-SCOMResourcePool -Member $Members -Action "Add"

Example 2: Remove objects from a resource pool

This example changes the properties of a resource pool by removing objects from the resource pool.

The first command uses the Get-SCOMManagementServer cmdlet to get the management server with the display name of Member01 and stores it in the $Member variable.

The second command uses the Get-SCOMResourcePool cmdlet to get the resource pool with the display name of Pool01 and then uses the Set-SCOMResourcePool cmdlet to remove the object stored in the $Member variable from that resource pool.

PS C:\> $Member = Get-SCOMManagementServer -Name "Member01"
PS C:\> Get-SCOMResourcePool -DisplayName "Pool01" | Set-SCOMResourcePool -Member $Member -Action "Remove"

Example 3: Add an observer object to a resource pool

This example changes the properties of a resource pool by adding an observer object to the resource pool.

The first command uses the Get-SCOMManagementServer cmdlet to get the management server named Observer01, and stores the object in the variable named $Observer.

The second command uses the Get-SCOMResourcePool cmdlet to get the resource pool with the display name of Pool01 and then uses the Set-SCOMResourcePool cmdlet to add the Observer object stored in the $Observer variable to that resource pool.

PS C:\> $Observer = Get-SCOMManagementServer -Name "Observer01"
PS C:\> Get-SCOMResourcePool -DisplayName "Pool01" | Set-SCOMResourcePool -Observer $Observer -Action "Add" -Passthru

Example 4: Remove an observer object from a resource pool

This example changes the properties of a resource pool by removing an observer object from the resource pool.

The first command uses the Get-SCOMManagementServer cmdlet to get the management server named Observer01, and stores the object in the variable named $Observer.

The second command uses the Get-SCOMResourcePool cmdlet to get the resource pool with the display name of Pool01 and then uses the Set-SCOMResourcePool cmdlet to remove the Observer object stored in the $Observer variable from that resource pool.

PS C:\> $Observer = Get-SCOMManagementServer -Name "Observer01"
PS C:\> Get-SCOMResourcePool -DisplayName "Pool01" | Set-SCOMResourcePool -Observer $Observer -Action "Remove" –Passthru

Example 5: Make a display name property change to a resource pool

This example changes the properties of a resource pool by changing a property of the resource pool.

The first command uses the Get-SCOMResourcePool cmdlet to get the resource pool with a display name of Pool01, and stores the object in the variable named $Pool.

The second command changes the value of the DisplayName property for the resource pool stored in the $Pool variable to New Pool 02.

The last command uses the ApplyChanges() method to commit the change to the DisplayName property.

PS C:\> $Pool = Get-SCOMResourcePool -DisplayName "Pool01"
PS C:\>$Pool.DisplayName = "New Pool 02"
PS C:\>$Pool.ApplyChanges()

Example 6: Make a description property change to a resource pool

This example makes a change to a description property for a resource pool.

The first command uses the Get-SCOMResourcePool cmdlet to get the resource pool with a display name of New Pool 02, and stores the object in the variable named $Pool.

The second command changes the value of the Description property for the resource pool stored in the $Pool variable.

The last command uses the ApplyChanges() method to commit the change to the Description property.

PS C:\> $Pool = Get-SCOMResourcePool -DisplayName "New Pool 02"
PS C:\> $Pool.Description = "Description of New Pool 02"
PS C:\> $Pool.ApplyChanges()

Get-SCResourcePool

New-SCResourcePool

Remove-SCResourcePool