Powershell Commandlets - Credential Manager Module
Powershell Commandlets - Credential Manager Module
This information was taken directly from the Get-Help files within the CredentialMabnager commandlets.
SYNTAX
Get-StoredCredential [-AsCredentialObject <SwitchParameter>] [-Target
<string>] [-Type <CredType>] [<CommonParameters>]
DESCRIPTION
Gets stored credentials from the Windows Credential Store/Vault and
returns as either a PSCredential object or as a Credential Object
PARAMETERS
-Target <string>
The command will only return credentials with the specified
target
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Type <CredType>
Specifies the type of credential to return, possible values are
[GENERIC, DOMAIN_PASSWORD, DOMAIN_CERTIFICATE, DOMAIN_VISIBLE_PASSWORD,
GENERIC_CERTIFICATE, DOMAIN_EXTENDED, MAXIMUM, MAXIMUM_EX]
Required? false
Position? named
Default value Generic
Accept pipeline input? false
Accept wildcard characters? false
-AsCredentialObject <SwitchParameter>
Switch to return the credentials as Credential objects instead of
the default PSObject
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
The command will only return credentials with the specified
target
OUTPUTS
PSCredentialManager.Common.Credential
System.Management.Automation.PSCredential
EXAMPLE 1
UserName Password
-------- --------
test-user System.Security.SecureString
EXAMPLE 2
Flags : 0
Type : GENERIC
TargetName : server01
Comment :
PaswordSize : 18
Password : Password1
Persist : ENTERPRISE
AttributeCount : 0
Attributes : 0
TargetAlias :
UserName : test-user
RELATED LINKS
Get-StoredCredential
Get-StrongPassword
SYNOPSIS
Generates a strong password
SYNTAX
Get-StrongPassword [-Length <int>] [-NumberOfSpecialCharacters <int>]
[<CommonParameters>]
DESCRIPTION
Generates a strong password based on the parameters provided
PARAMETERS
-Length <int>
Length in Characters for the generated password to be.
Required? false
Position? named
Default value 10
Accept pipeline input? false
Accept wildcard characters? false
-NumberOfSpecialCharacters <int>
Number of special characters to include in the password, must be
less than the length of the password
Required? false
Position? named
Default value 3
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
NOTES
EXAMPLE 1
PS C:\> Get-StrongPassword
QTJ(T?wwe)
EXAMPLE 2
zPN>C%.f/(l1aGq)n3Ze
RELATED LINKS
Online Version
https://github.com/davotronic5000/PowerShell_Credential_Manager/wiki/Get-
StrongPassword
New-StoredCredential
SYNOPSIS
Create a new credential in the Windows Credential Store/Vault
SYNTAX
New-StoredCredential [-Comment <string>] [-Password <string>] [-
Persist <CredPersist>] [-Target <string>] [-Type <CredType>] [-UserName
<string>]
[<CommonParameters>]
DESCRIPTION
Create a new credential in the Windows Credential Store/Vault
PARAMETERS
-Target <string>
Specifies the target of the credentials being added.
Required? false
Position? named
Default value DESKTOP-6O28IQJ
Accept pipeline input? false
Accept wildcard characters? false
-UserName <string>
specified the username to be used for the credentials, cannot be
used in conjunction with Credentials parameter.
Required? false
Position? named
Default value Dave
Accept pipeline input? false
Accept wildcard characters? false
-Password <string>
Specifies the password in plain text, cannot be used in
conjunction with SecurePassword or Credential parameters.
Required? false
Position? named
Default value 2hxmOG=wM:
Accept pipeline input? false
Accept wildcard characters? false
-SecurePassword <SecureString>
Specifies the password as a secure string, cannot be used in
conjunction with SecurePassword or Credential parameters.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Comment <string>
Provides a comment to identify the credentials in the store
Required? false
Position? named
Default value Updated by: Dave on: 10/06/2016
Accept pipeline input? false
Accept wildcard characters? false
-Type <CredType>
Type of credential to store, possible values are [GENERIC,
DOMAIN_PASSWORD, DOMAIN_CERTIFICATE, DOMAIN_VISIBLE_PASSWORD,
GENERIC_CERTIFICATE,
DOMAIN_EXTENDED, MAXIMUM, MAXIMUM_EX]
Required? false
Position? named
Default value Generic
Accept pipeline input? false
Accept wildcard characters? false
-Persist <CredPersist>
sets the persistence settings of the credential, possible values
are [SESSION, LOCAL_MACHINE, ENTERPRISE]
Required? false
Position? named
Default value Session
Accept pipeline input? false
Accept wildcard characters? false
-Credentials <PSCredential>
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Management.Automation.PSCredential
OUTPUTS
PSCredentialManager.Common.Credential
EXAMPLE 1
Flags : 0
Type : GENERIC
TargetName : server01
PaswordSize : 18
Password : Password1
Persist : SESSION
AttributeCount : 0
Attributes : 0
TargetAlias :
UserName : test-user
EXAMPLE 2
PS C:\> Get-Credential -UserName test-user -Message "Password please"
| New-StoredCredential -Target Server01
RELATED LINKS
Online Version
https://github.com/davotronic5000/PowerShell_Credential_Manager/wiki/New-
StoredCredential
Remove-StoredCredential
SYNOPSIS
Deletes a credentials from the Windows Credential Store/Vault
SYNTAX
Remove-StoredCredential -Target <string> [-Type <CredType>]
[<CommonParameters>]
DESCRIPTION
Deletes a credentials from the Windows Credential Store/Vault
PARAMETERS
-Target <string>
specifies a target to identitfy the credential to be deleted
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Type <CredType>
Specifies the type of credential to be deleted, possible values
are [GENERIC, DOMAIN_PASSWORD, DOMAIN_CERTIFICATE,
DOMAIN_VISIBLE_PASSWORD,
GENERIC_CERTIFICATE, DOMAIN_EXTENDED, MAXIMUM, MAXIMUM_EX]
Required? false
Position? named
Default value Generic
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see
about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
specifies a target to identitfy the credential to be deleted
OUTPUTS
EXAMPLE 1
RELATED LINKS
Online Version
https://github.com/davotronic5000/PowerShell_Credential_Manager/wiki/Remo
ve-StoredCredential