< Back

Get-CredentialStoreItem

Sun Jan 19, 2020 6:35 pm

NAME Get-CredentialStoreItem



SYNOPSIS

Returns the Credential from a given remote host item.





SYNTAX

Get-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]



Get-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] -Shared [-Path <String>] [<CommonParameters>]





DESCRIPTION

Return the credential as PSCredential object.





PARAMETERS

-RemoteHost <String>

Specify the host, for which you would like to change the credentials.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Identifier <String>

Provide a custom identifier to the given remote host key. This enables you to store multiple credentials

for a single remote host entry. For example ad/sys1, ftp/sys1, mssql/sys1



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Shared [<SwitchParameter>]

Switch to shared mode with this param. This enforces the command to work with a shared CredentialStore which

can be decrypted across systems.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

Define a custom path to a shared CredentialStore.



Required? false

Position? named

Default value

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

[None]





OUTPUTS

[System.Management.Automation.PSCredential]





NOTES





- File Name : Get-CredentialStoreItem.ps1

- Author : Messing - marco.blessing@googlemail.com

- Requires :



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$myCreds = Get-CredentialStoreItem -Path "C:\\TMP\\mystore.json" -RemoteHost "esx01.myside.local"















RELATED LINKS

https://github.com/OCram85/PSCredentialStore