Remove-AzADSpCredential
语法
ObjectIdWithKeyIdParameterSet (默认值)
Remove-AzADSpCredential
-ObjectId <String>
[-KeyId <Guid>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SPNWithKeyIdParameterSet
Remove-AzADSpCredential
-ServicePrincipalName <String>
[-KeyId <Guid>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DisplayNameWithKeyIdParameterSet
Remove-AzADSpCredential
-DisplayName <String>
[-KeyId <Guid>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ServicePrincipalObjectParameterSet
Remove-AzADSpCredential
-ServicePrincipalObject <IMicrosoftGraphServicePrincipal>
[-KeyId <Guid>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
示例
示例 1:按密钥 ID 删除服务主体凭据
Remove-AzADSpCredential -DisplayName $name -KeyId $keyid
按密钥 ID 删除服务主体凭据
示例 2:从服务主体中删除所有凭据
Get-AzADServicePrincipal -DisplayName $name | Remove-AzADSpCredential
从服务主体中删除所有凭据
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
类型: | PSObject
|
默认值: | None |
支持通配符: | False |
不显示: | False |
别名: | AzContext, AzureRmContext, AzureCredential |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-DisplayName
服务主体的显示名称。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
DisplayNameWithKeyIdParameterSet
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-KeyId
要删除的凭据的密钥 ID。
参数属性
类型: | Guid
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-ObjectId
服务主体的对象 ID。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
别名: | Id |
参数集
ObjectIdWithKeyIdParameterSet
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-PassThru
当命令成功时返回 true
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-ServicePrincipalName
服务主体名称。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
SPNWithKeyIdParameterSet
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-ServicePrincipalObject
服务主体对象可用作管道输入。
参数属性
参数集
ServicePrincipalObjectParameterSet
Position: | Named |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出
备注
别名
Remove-AzADServicePrincipalCredential