New-SCOMResourcePool
在 Operations Manager 中建立資源集區。
Syntax
New-SCOMResourcePool
[-DisplayName] <String>
[-Member] <ComputerHealthService[]>
[-Observer <ComputerHealthService[]>]
[-Description <String>]
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
New-SCOMResourcePool Cmdlet 會在 System Center - Operations Manager 中建立資源集區。 資源集區可讓管理伺服器集合散發工作負載。
範例
範例 1:建立資源集區
PS C:\>New-SCOMResourcePool -DisplayName "Pool01" -Member (Get-SCOMManagementServer) -PassThru
此範例會建立名為 Pool01 的資源集區,其中包含所有管理伺服器。
先執行的括號中的命令會使用 Get-SCOMmanagementServer Cmdlet 來取得所有管理伺服器。 接著,Cmdlet 會將命令的結果以括號傳遞至 New-SCOMResourcePool Cmdlet,此 Cmdlet 會建立資源集區並新增管理伺服器。
注意:由於管理伺服器會手動新增至此資源集區,因此此資源集區不會啟用自動成員資格,而且您必須手動新增所有未來的成員。
參數
-ComputerName
指定電腦名稱的陣列。 Cmdlet 會為這些電腦建立與管理群組的暫時連線。 您可以使用 NetBIOS 名稱、IP 位址或完整功能變數名稱, (FQDN) 。 若要指定本機電腦,請輸入電腦名稱、localhost 或句點 (.)。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
在執行 Cmdlet 前提示您確認。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
指定管理群組連線的 PSCredential 物件。
若要取得 PSCredential 物件,請使用 Get-Credential Cmdlet。
如需詳細資訊,請輸入 “Get-Help Get-Credential
”如果您在 ComputerName 參數中指定電腦,請使用可存取該電腦的帳戶。
預設為目前使用者。
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定資源集區的描述。 參數接受最多 4,000 個字元的字元長度。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
指定物件的顯示名稱。 DisplayName 參數的值可能會因使用者匯入管理群組的當地語系化管理元件,以及執行 Windows PowerShell的使用者地區設定而有所不同
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Member
指定要包含在資源集區中的物件數位。
可以是資源集區成員的有效物件包括管理伺服器或閘道伺服器。
如需如何取得閘道伺服器物件的詳細資訊,請輸入 “Get-Help Get-SCOMGatewayManagementServer
” 。
Type: | ComputerHealthService[] |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Observer
指定目前不在資源集區中的管理伺服器或閘道管理伺服器陣列。
若要讓資源集區具有高可用性,您必須將至少三個成員新增至集區,或兩個成員和一個觀察者。
Type: | ComputerHealthService[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SCSession
指定 Connection 物件的陣列。 若要取得 Connection 物件,請使用 Get-SCManagementGroupConnection Cmdlet。
Type: | Connection[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 Cmdlet 並不會執行。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |