< Back

select-MiCredential

Sat Jan 18, 2020 11:37 am

NAME select-MiCredential



SYNOPSIS

Store PSCredential to file for later use (DPAPI encryption).





SYNTAX

select-MiCredential [[-scope] <String>] [-plain] [<CommonParameters>]





DESCRIPTION

Saves/Retrieves credentials to/from a file (with encrypted password) so you can automate tasks that need different

credentials





PARAMETERS

-scope <String>

Scope of the credential. If omitted a form will show up to select saved credential or create new one



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-plain [<SwitchParameter>]

Retrieves credentials with plain username and password in case you need to use them in external commands. p.e

psexec.



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



INPUTS



OUTPUTS

PowerShell object with username and password.





NOTES





Author : Mikel V.

version: 0.9

Date : 2017/02/25



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



PS C:\\>Select-MiCredential -scope "myDomain"



This command will return a PSCredential Object with credentials previously stored for "myDomain".

If file doesn't exist yet, it will ask for credentials and save the file on the fly.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Select-MiCredential -scope "myDomain" -plain



This command will return an object with username and plain password with credentials previously stored for

"myDomain".

If file doesn't exist yet it will ask for credentials and save the file on the fly.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Select-MiCredential



This command will show a form with a dropdown menu to choose proper credential from stored files

If dropdown menu is empty is because you didn't store any credential yet, then you can type the scope you want and

then fill in your credentials.











RELATED LINKS

https://sistemaswin.com