共用方式為


Remove-AzureRmSqlServerActiveDirectoryAdministrator

拿掉 SQL Server 的 Microsoft Entra 系統管理員。

警告

自 2024 年 2 月 29 日起,AzureRM PowerShell 模組已正式淘汰。 建議使用者從 AzureRM 遷移至 Az PowerShell 模組,以確保持續支援和更新。

雖然 AzureRM 模組可能仍可運作,但不再維護或支援它,但會根據用戶的判斷權和風險放置任何繼續使用。 如需轉換至 Az 模組的指引,請參閱我們的 移轉資源

語法

Remove-AzureRmSqlServerActiveDirectoryAdministrator
      [-Force]
      [-ServerName] <String>
      [-ResourceGroupName] <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Remove-AzureRmSqlServerActiveDirectory 管理員 istrator Cmdlet 會移除目前訂用帳戶中 AzureSQL Server 的 Microsoft Entra 系統管理員。

範例

範例 1:移除系統管理員

PS C:\>Remove-AzureRmSqlServerActiveDirectoryAdministrator -ResourceGroupName "ResourceGroup01" -ServerName "Server01"
Confirm 
Are you sure you want to remove the Azure Sql Server Active Directory Administrator on server 'Server01'? 
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y 

ResourceGroupName ServerName DisplayName ObjectId 
----------------- ---------- ----------- -------- 
ResourceGroup01   Server01   DBAs        40b79501-b343-44ed-9ce7-da4c8cc7353b

此命令會移除與資源群組 ResourceGroup01 相關聯之伺服器之 Server01 的 Microsoft Entra 系統管理員。

參數

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Force

強制命令執行,而不要求使用者確認。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

指定指派 SQL Server 的資源群組名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ServerName

指定此 Cmdlet 移除系統管理員的 SQL Server 名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

輸出

AzureSqlServerActiveDirectoryAdministratorModel