PowerCLI Reference

Remove-VICredentialStoreItem

Synopsis

This cmdlet removes the specified credential store items.

Syntax

Remove-VICredentialStoreItem [-CredentialStoreItem] <VICredentialStoreItem[]> [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-VICredentialStoreItem [[-Host] <String>] [[-User] <String>] [[-File] <String>] [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
Get-VICredentialStoreItem
New-VICredentialStoreItem

Detailed Description

This cmdlet removes the credential store items that match the specified Host and User parameters. At least one of the Host and User parameters must be provided. To remove all passwords, call "Remove-VICredentialStoreItem *", which is a wildcard matching all hosts.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
CredentialStoreItemVICredentialStoreItem[]Specifies the credential store items you want to remove.trueTrue (ByValue)
HostStringSpecifies a host to filter the credential store items you want to remove.falseFalse
UserStringSpecifies a user to filter the credential store items you want to remove.falseFalse
FileStringSpecifies the file location of the credential store items that are to be removed.falseFalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

None

Notes

This cmdlet is not supported on the Core edition of PowerShell.

Examples

-------------------------- Example 1 --------------------------

Remove-VICredentialStoreItem -Host 192.168.1.100 -Confirm

Removes all credentials for the specified host from the default credential store file.

-------------------------- Example 2 --------------------------

Remove-VICredentialStoreItem -User 'admin' -Host '192.168.*' -File 'credentials.xml' -Confirm

Removes all credentials for the specified user and network from a credential store file.


Copyright © VMware, Inc. All rights reserved.