-
Notifications
You must be signed in to change notification settings - Fork 46
Get StoredCredential
Gets stored credentials from the Windows Credential Store/Vault
Get-StoredCredential [-Target <String>] [-Type <Cred_Type>] [-AsCredentialObject] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
Gets stored credentials from the Windows Credential Store/Vault and returns as either a PSCredential object or as a Credential Object
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 |
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 |
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 |
Required? | False |
Position? | named |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Required? | False |
Position? | named |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
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).
Credential object, contains more data and returns the password as plain text
PS C:\> Get-StoredCredential -Target Server01
UserName Password -------- -------- test-user System.Security.SecureString
Returns credentials for Server01 as a PSCredential object
PS C:\> Get-StoredCredential -Target Server01 -AsCredentialObject
Flags : 0 Type : GENERIC TargetName : server01 Comment : LastWritten : 23/04/2016 10:01:37 PaswordSize : 18 Password : Password1 Persist : ENTERPRISE AttributeCount : 0 Attributes : 0 TargetAlias : UserName : test-user
Returns credentials for Server01 as a Credential object