你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Remove-AzureStorSimpleStorageAccountCredential

删除现有的存储帐户凭据。

注意

本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧式 Azure 资源。 创建新资源时,建议不要使用旧的 PowerShell 模块,因为计划将停用 ASM。 有关详细信息,请参阅 Azure Service Manager 停用

Az PowerShell 模块是建议用于管理 PowerShell 的 Azure 资源管理器 (ARM) 资源的 PowerShell 模块。

语法

IdentifyByName

Remove-AzureStorSimpleStorageAccountCredential
    -StorageAccountName <String>
    [-WaitForComplete]
    [-Force]
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]

IdentifyByObject

Remove-AzureStorSimpleStorageAccountCredential
    -SAC <StorageAccountCredentialResponse>
    [-WaitForComplete]
    [-Force]
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]

说明

Remove-AzureStorSimpleStorageAccountCredential cmdlet 删除现有的存储帐户凭据。 按名称指定帐户,或使用 Get-AzureStorSimpleStorageAccountCredential cmdlet 获取要删除的 StorageAccountCredential 对象。

示例

示例 1:删除存储帐户凭据

PS C:\>Remove-AzureStorSimpleStorageAccountCredential -StorageAccountName "ContosoStorage07" -Force
VERBOSE: ClientRequestId: 8e10d56b-ddb1-459b-b26e-a185f5a303de_PS
VERBOSE: About to create a job to remove your Storage Access Credential!
VERBOSE: ClientRequestId: 55cb6296-0156-4266-8591-d9e9bf8cc584_PS
982f4b19-ccb0-4ad3-9b02-f8ad25bf2e72
VERBOSE: The delete task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
982f4b19-ccb0-4ad3-9b02-f8ad25bf2e72 for tracking the task's status

此命令删除名为 ContosoStorage07 的存储帐户的帐户凭据。 此命令指定 Force 参数。 该 cmdlet 无需提示确认即可删除凭据。

示例 2:使用管道操作员删除存储帐户凭据

PS C:\>Get-AzureStorSimpleStorageAccountCredential -StorageAccountName "ContosoStorage07" | Remove-AzureStorSimpleStorageAccountCredential -Force -WaitForComplete
VERBOSE: ClientRequestId: f1b46216-bf4c-4c19-8e92-1dfe3894e258_PS
VERBOSE: ClientRequestId: 0d946f8f-c771-4ade-8a83-7c08dad86c52_PS
VERBOSE: ClientRequestId: 2000bab6-8311-4192-ad12-c67e35fc2697_PS
VERBOSE: Storage Access Credential with name ContosoStorage07 found!
VERBOSE: About to run a job to remove your Storage Access Credential!
VERBOSE: ClientRequestId: b803b165-bef8-4a8f-9509-4b515ea8bdec_PS
VERBOSE: Your delete operation completed successfully!

此命令使用 Get-AzureStorSimpleStorageAccountCredential cmdlet 获取名为 ContosoStorage07 的存储帐户,然后将该对象传递给当前 cmdlet。 当前 cmdlet 删除该存储帐户的凭据。 此命令指定 WaitForComplete 参数。 该 cmdlet 在完成删除操作之前不会将控制权返回到控制台。

参数

-Force

指示此 cmdlet 不会提示你进行确认。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Profile

指定 Azure 配置文件。

参数属性

类型:AzureSMProfile
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SAC

将凭据指定为要删除的 StorageAccountCredential 对象。 若要获取 StorageAccountCredential 对象,请使用 Get-AzureStorSimpleStorageAccountCredential cmdlet。

参数属性

类型:StorageAccountCredentialResponse
默认值:None
支持通配符:False
不显示:False

参数集

IdentifyByObject
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-StorageAccountName

指定要删除的存储帐户凭据的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False
别名:名称

参数集

IdentifyByName
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WaitForComplete

指示此 cmdlet 等待操作完成,然后再将控制权返回到 Windows PowerShell 控制台。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

StorageAccountCredential

此 cmdlet 使用管道接受 StorageAccountCredential 对象。

输出

TaskStatusInfo

如果指定 WaitForComplete 参数,此 cmdlet 将返回 TaskStatusInfo 对象。