Restart-AzPostgreSqlFlexibleServer
重新啟動伺服器。
語法
Restart-AzPostgreSqlFlexibleServer
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-FailoverMode <String>]
[-RestartWithFailover]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Restart-AzPostgreSqlFlexibleServer
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Parameter <IRestartParameter>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Restart-AzPostgreSqlFlexibleServer
-InputObject <IPostgreSqlIdentity>
[-FailoverMode <String>]
[-RestartWithFailover]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Restart-AzPostgreSqlFlexibleServer
-InputObject <IPostgreSqlIdentity>
-Parameter <IRestartParameter>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
重新啟動伺服器。
範例
範例 1:依資源名稱重新啟動伺服器
Restart-AzPostgreSqlFlexibleServer -ResourceGroupName PowershellPostgreSqlTest -Name postgresql-test
依名稱重新啟動伺服器
範例 2:依身分識別重新啟動伺服器
$ID = "/subscriptions/<SubscriptionId>/resourceGroups/PowershellPostgreSqlTest/providers/Microsoft.DBForPostgreSql/flexibleServers/postgresql-test/restart"
Restart-AzPostgreSqlFlexibleServer -InputObject $ID
依身分識別重新啟動伺服器
範例 3:使用計劃性故障轉移重新啟動伺服器
Restart-AzPostgreSqlFlexibleServer -ResourceGroupName PowershellPostgreSqlTest -Name postgresql-test -RestartWithFailover -FailoverMode PlannedFailover
使用計劃性故障轉移依名稱重新啟動伺服器
範例 4:使用強制故障轉移重新啟動伺服器
Restart-AzPostgreSqlFlexibleServer -ResourceGroupName PowershellPostgreSqlTest -Name postgresql-test -RestartWithFailover -FailoverMode ForcedFailover
使用強制故障轉移依名稱重新啟動伺服器
參數
-AsJob
以作業身分執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-FailoverMode
故障轉移模式。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
類型: | IPostgreSqlIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
伺服器的名稱。
類型: | String |
別名: | ServerName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NoWait
以異步方式執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Parameter
表示伺服器重新啟動參數。 若要建構,請參閱PARAMETER屬性和建立哈希表的NOTES一節。
類型: | IRestartParameter |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-PassThru
當命令成功時傳回 true
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-RestartWithFailover
指出是否使用故障轉移重新啟動伺服器。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。
類型: | String |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |