New-VICredentialStoreItem Command | Vmware PowerCLI Reference

New-VICredentialStoreItem

This cmdlet creates a new entry in the credential store. If there is an existing entry for the specified host and user, it is overwritten. If the credential store file does not exist, it is created (along with its directory if needed). If no file is specified, the item is created in the default credential store file %APPDATA%\VMware\credstore\vicredentials.xml. Credential store items for vCloud Director servers must contain user name and organization in the following format: user_name:organization_name, where both names are lower-cased.

Syntax

New-VICredentialStoreItem
[ -User ] < String >
-Host < String >
[ [-Password ] < String > ]
[ [-File ] < String > ]
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
User String 1
Specifies a user name.
required
Host String named
Specifies the host for which you want to create the new credentials item.
optional Password String 2
Specifies a password.
optional File String 3
Specifies a file path where you want to store the new credentials.
optional ProgressAction ActionPreference named

Output

VMware.VimAutomation.ViCore.Types.V1.VICredentialStoreItem

Examples

Example 1

New-VICredentialStoreItem -Host 192.168.1.10 -User Admin -Password pass

Adds a new item in the default credential store file.

Related Commands

VICredentialStoreItem

This cmdlet retrieves the credential store items available on a vCenter Server system.

This cmdlet creates a new entry in the credential store.

This cmdlet removes the specified credential store items.