0% found this document useful (0 votes)
292 views

Powershell Commandlets - Credential Manager Module

The document discusses the Powershell Credential Manager module which allows managing credentials stored in the Windows credential vault. It provides documentation on the Get-StoredCredential, Get-StrongPassword, New-StoredCredential, and Remove-StoredCredential commandlets, including their purpose, syntax, parameters, inputs, outputs, and examples.

Uploaded by

leslewis65
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
292 views

Powershell Commandlets - Credential Manager Module

The document discusses the Powershell Credential Manager module which allows managing credentials stored in the Windows credential vault. It provides documentation on the Get-StoredCredential, Get-StrongPassword, New-StoredCredential, and Remove-StoredCredential commandlets, including their purpose, syntax, parameters, inputs, outputs, and examples.

Uploaded by

leslewis65
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Powershell Commandlets

Credential Manager Module

Compiled by Les Lewis

This information was taken directly from the Get-Help files within the CredentialMabnager commandlets.

This is for informational use, placed into an easy to read format.


Table of Contents
What is it used for? ..................................................................................................................................... 3
Get-StoredCredential .................................................................................................................................. 4
SYNOPSIS ............................................................................................................................................... 4
SYNTAX .................................................................................................................................................... 4
DESCRIPTION ......................................................................................................................................... 4
PARAMETERS ........................................................................................................................................... 4
INPUTS .................................................................................................................................................... 5
OUTPUTS.................................................................................................................................................. 5
RELATED LINKS .................................................................................................................................... 6
Get-StrongPassword ................................................................................................................................... 7
SYNOPSIS ............................................................................................................................................... 7
SYNTAX .................................................................................................................................................... 7
DESCRIPTION ......................................................................................................................................... 7
PARAMETERS ........................................................................................................................................... 7
INPUTS .................................................................................................................................................... 7
OUTPUTS.................................................................................................................................................. 7
RELATED LINKS .................................................................................................................................... 8
New-StoredCredential ................................................................................................................................. 9
SYNOPSIS ............................................................................................................................................... 9
SYNTAX .................................................................................................................................................... 9
DESCRIPTION ......................................................................................................................................... 9
PARAMETERS ........................................................................................................................................... 9
INPUTS .................................................................................................................................................. 11
OUTPUTS................................................................................................................................................ 11
RELATED LINKS .................................................................................................................................. 12
Remove-StoredCredential ........................................................................................................................ 13
SYNOPSIS ............................................................................................................................................. 13
SYNTAX .................................................................................................................................................. 13
DESCRIPTION ....................................................................................................................................... 13
PARAMETERS ......................................................................................................................................... 13
INPUTS .................................................................................................................................................. 13
OUTPUTS................................................................................................................................................ 14
RELATED LINKS .................................................................................................................................. 14
What is it used for?
Exposes Windows Installer functionality to Windows PowerShell
Get-StoredCredential
SYNOPSIS
Gets stored credentials from the Windows Credential Store/Vault

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

PS C:\> Get-StoredCredential -Target Server01

Returns credentials for Server01 as a PSCredential object

UserName Password

-------- --------

test-user System.Security.SecureString

EXAMPLE 2

PS C:\> Get-StoredCredential -Target Server01 -AsCredentialObject

Returns credentials for Server01 as a Credential object

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

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

Generates a password 10 characters long with 3 special characters

QTJ(T?wwe)

EXAMPLE 2

PS C:\> Get-StrongPassword -Length 20 -NumberOfSpecialCharacters 5

Generates a password 20 characters long with 5 special characters

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>]

New-StoredCredential [-Comment <string>] [-Persist <CredPersist>] [-


SecurePassword <SecureString>] [-Target <string>] [-Type <CredType>]
[-UserName <string>] [<CommonParameters>]

New-StoredCredential [-Comment <string>] [-Credentials


<PSCredential>] [-Persist <CredPersist>] [-Target <string>] [-Type
<CredType>]
[<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

PS C:\> New-StoredCredential -Target server01 -UserName test-user -


Password Password1

creates a credential for server01 with the username test-user and


password Password1

Flags : 0

Type : GENERIC

TargetName : server01

Comment : Updated by: Dave on: 23/04/2016

LastWritten : 23/04/2016 10:48:56

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

Creates a credential for Server01 with the username and password


provided in the PSCredential object from Get-Credential

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

PS C:\> Remove-StoredCredential -Target Server01 -Type GENERIC

Deletes a generic credential with the target Server01

RELATED LINKS
Online Version
https://github.com/davotronic5000/PowerShell_Credential_Manager/wiki/Remo
ve-StoredCredential

You might also like