New-DSCredentialEntry
Synopsis
Create a new entry of type 'Credentials'.
Syntax
__AllParameterSets
New-DSCredentialEntry [[-ConnectionSubType] <CredentialResolverConnectionType>] [-Name] <string>
[[-Domain] <string>] [[-Username] <string>] [[-Password] <string>] [[-MnemonicPassword] <string>]
[[-VaultID] <guid>] [[-Group] <string>] [-PromptForPassword] [-Description <string>]
[-Tags <string>] [-Expiration <string>] [-CredentialViewedCommentIsRequired]
[-TicketNumberIsRequiredOnCredentialViewed] [-CredentialViewedPrompt]
[-CheckoutMode <CheckOutMode>] [-AllowOffline <AllowOffline>] [-PrivateKeyType <PrivateKeyType>]
[-PrivateKeyPath <string>] [-PrivateKeyPassphrase <string>] [-PromptForPassphrase]
[-AsLegacyResponse] [<CommonParameters>]Description
Create a new entry of type 'Credentials' with the parameters supplied. For the supported subtypes, see the ConnectionSubType parameter.
Examples
PS C:\> $NewCredEntry = @{
VaultId = ([guid]::Empty)
EntryName = 'rootlocal '
Username = 'root'
Password = 'Pa$$w0rd!'
Folder = 'Powershell rules'
credentialViewedCommentIsRequired = $true
credentialViewedPrompt = $true
ticketNumberIsRequiredOnCredentialViewed = $true
checkOutMode = 'Default'
Description = 'This is a description'
Tags = '1 2 3 4 5'
};
New-DSCredentialEntry @NewCredEntryCreate a 'Username/Password' credential.
Parameters
-AllowOffline
Entry's offline mode.
-AsLegacyResponse
In versions prior to 2024.2, many DS cmdlets returned a ServerResponse object. Enabling this backward compatibility switch allows scripts developed for earlier versions to function correctly.
-CheckoutMode
Entry's checkout mode.
-ConnectionSubType
Connection sub-type. Used for connections of type Credentials. Supported sub-type are Default (Username/Password) or PrivateKey
-CredentialViewedCommentIsRequired
A comment is required to view entry's credentials
-CredentialViewedPrompt
Prompt the user for comment/ticket number
-Description
Entry's description
-Domain
Domain's name
-Expiration
Entry's expiration date (ISO-8601 format (yyyy-mm-ddThh:mm:ss.000Z)
-Group
Entry's location in the vault (folder name, not ID)
-MnemonicPassword
Entry's mnemonic password to help remembering the password
-Name
Entry's name
-Password
Entry's password
-PrivateKeyPassphrase
Private key passphrase
-PrivateKeyPath
Full private key path (*.ppk)
-PrivateKeyType
Private key type. The default type is Data.
-PromptForPassphrase
Prompt for passphrase before checkout.
-PromptForPassword
Prompt for password when checkout
-Tags
Entry's tags (keywords). Each word separated by a space is considered a keyword.
-TicketNumberIsRequiredOnCredentialViewed
A ticket number is required to view entry's credentials
-Username
Entry's username
-VaultID
Entry's vault ID.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Notes
For more information, type "Get-Help New-DSCredentialEntry -detailed". For technical information, type "Get-Help New-DSCredentialEntry -full".
Last updated
Was this helpful?