你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-AzSqlInstanceActiveDirectoryAdministrator
删除SQL 托管实例的 Microsoft Entra 管理员。
语法
Remove-AzSqlInstanceActiveDirectoryAdministrator
[-Force]
[-PassThru]
[-ResourceGroupName] <String>
[-InstanceName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlInstanceActiveDirectoryAdministrator
[-Force]
[-PassThru]
-InputObject <AzureSqlManagedInstanceModel>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlInstanceActiveDirectoryAdministrator
[-Force]
[-PassThru]
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Remove-AzSqlInstanceActiveDirectoryAdministrator cmdlet 删除当前订阅中 Azure 的 Microsoft Entra 管理员SQL 托管实例。
示例
示例 1:删除管理员
Remove-AzSqlInstanceActiveDirectoryAdministrator -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstanceName01" -Confirm -PassThru
Are you sure you want to remove the Azure Sql Instance Active Directory Administrator on managed instance 'ManagedInstanceName01'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
ResourceGroupName InstanceName DisplayName ObjectId
----------------- --------------------- ----------- --------
ResourceGroup01 ManagedInstanceName01 DBAs 40b79501-b343-44ed-9ce7-da4c8cc7353b
此命令删除与资源组 ResourceGroup01 关联的托管实例的 Microsoft Entra 管理员。
示例 2
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -Name "ManagedInstance1" | Remove-AzSqlInstanceActiveDirectoryAdministrator -Confirm -PassThru
Are you sure you want to remove the Azure Sql Instance Active Directory Administrator on managed instance 'ManagedInstanceName01'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
ResourceGroupName InstanceName DisplayName ObjectId
----------------- --------------------- ----------- --------
ResourceGroup01 ManagedInstanceName01 DBAs 40b79501-b343-44ed-9ce7-da4c8cc7353b
此命令从托管实例对象中删除 Microsoft Entra 管理员。
示例 3
Get-AzSqlInstance -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance1" | Remove-AzSqlInstanceActiveDirectoryAdministrator -Confirm -PassThru
Are you sure you want to remove the Azure Sql Instance Active Directory Administrator on managed instance 'ManagedInstanceName01'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
ResourceGroupName InstanceName DisplayName ObjectId
----------------- --------------------- ----------- --------
ResourceGroup01 ManagedInstanceName01 DBAs 40b79501-b343-44ed-9ce7-da4c8cc7353b
此命令使用托管实例资源标识符删除 Microsoft Entra 管理员。
参数
-Confirm
提示你在运行 cmdlet 之前进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Force
跳过执行操作的确认消息
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要使用的托管实例对象。
类型: | AzureSqlManagedInstanceModel |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-InstanceName
SQL 托管实例名称。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-PassThru
定义是否返回已删除的 AD 管理员
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源组的名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceId
要使用的实例的资源 ID
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
输出
AzureSqlInstanceActiveDirectoryAdministratorModel