forked from OCram85/PSCredentialStore
Adds markdown help pages in docs folder
* adds docs folder (#5) * fist module description * adds cmdlet markdown help * adds meta pages
This commit is contained in:
parent
acfc97ad45
commit
dbe5319537
1
docs/.gitkeep
Normal file
1
docs/.gitkeep
Normal file
@ -0,0 +1 @@
|
||||
This is a placeholder file.
|
174
docs/Connect-To.md
Normal file
174
docs/Connect-To.md
Normal file
@ -0,0 +1,174 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Connect-To
|
||||
|
||||
## SYNOPSIS
|
||||
Connects to the given host using the stored CredentialStoreItem.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>]
|
||||
[-Path <String>] [-Shared] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Establish a connection to the selected host using a stored CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
||||
```
|
||||
|
||||
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
|
||||
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
|
||||
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
|
||||
|
||||
### -------------------------- EXAMPLE 2 --------------------------
|
||||
```
|
||||
$MyCreds = Get-Credential
|
||||
```
|
||||
|
||||
Connect-To -RemoteHost "vcr01.myside.local" -Type VMware -Credentials $MyCreds
|
||||
Get-VM -Name "*vlm*" | Select-Object -Property Name
|
||||
Disconnect-From -RemoteHost "vcr01.myside.local" -Type VMware
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -RemoteHost
|
||||
Specify the host, for which you would like to change the credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
Defaults to "".
|
||||
Specify a string, which separates two CredentialStoreItems for the
|
||||
same hostname.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
Specify the host type of the target.
|
||||
Currently implemented targets are:
|
||||
- CiscoUcs Establish a connection to a Cisco UCS fabric interconnect.
|
||||
- FTP Establish a connection to a FTP host.
|
||||
- NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer.
|
||||
- VMware Establish a connection to a VMware vCenter or ESXi host.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Credentials
|
||||
Use this parameter to bypass the stored credentials.
|
||||
Without this parameter Connect-To tries to read the
|
||||
needed credentials from the CredentialStore.
|
||||
If you provide this parameter you skip this lookup behavior.
|
||||
So you can use it to enable credentials without preparing any user interaction.
|
||||
|
||||
```yaml
|
||||
Type: PSCredential
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## NOTES
|
||||
File Name : Connect-To.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires : PSFTP, PowerCLI
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
120
docs/Disconnect-From.md
Normal file
120
docs/Disconnect-From.md
Normal file
@ -0,0 +1,120 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Disconnect-From
|
||||
|
||||
## SYNOPSIS
|
||||
Terminates a session established with Connect-To using a CredentialStoreItem.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Disconnect-From [-RemoteHost] <String> [-Type] <String> [-Force] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Terminates a session established with Connect-To using a CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
Disconnect-From -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
||||
```
|
||||
|
||||
### -------------------------- EXAMPLE 2 --------------------------
|
||||
```
|
||||
Disconnect-From -RemoteHost "ftp.myside.local" -Type FTP
|
||||
```
|
||||
|
||||
### -------------------------- EXAMPLE 3 --------------------------
|
||||
```
|
||||
Disconnect-From -RemoteHost "fas.myside.local" -Type NetAppFAS
|
||||
```
|
||||
|
||||
### -------------------------- EXAMPLE 4 --------------------------
|
||||
```
|
||||
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware
|
||||
```
|
||||
|
||||
### -------------------------- EXAMPLE 5 --------------------------
|
||||
```
|
||||
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -RemoteHost
|
||||
Specify the remote endpoint, whose session you would like to terminate.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
Specify the host type of the target.
|
||||
Currently implemented targets are:
|
||||
- CiscoUcs Establish a connection to a Cisco UCS Fabric Interconnect.
|
||||
- FTP Establish a connection to a FTP host.
|
||||
- NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer.
|
||||
- VMware Establish a connection to a VMware vCenter or ESXi host.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Force
|
||||
Force the disconnect, even if the disconnect would fail.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## NOTES
|
||||
File Name : Disconnect-To.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
92
docs/Get-CredentialStore.md
Normal file
92
docs/Get-CredentialStore.md
Normal file
@ -0,0 +1,92 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CredentialStore
|
||||
|
||||
## SYNOPSIS
|
||||
Reads the complete content of the credential store and returns it as a new object.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Get-CredentialStore [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Get-CredentialStore [-Path <String>] [-Shared] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
The content is in a raw format.
|
||||
It means there is no transformation to the different credential types.
|
||||
You can not use the object properties to connect with remote host.
|
||||
Therefore please use
|
||||
Get-CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
$CSContent = Get-CredentialStore -Path "C:\TMP\mystore.json"
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [PSObject] Returns the credential store content as PSObject.
|
||||
|
||||
## NOTES
|
||||
File Name : Get-CredentialStore.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
122
docs/Get-CredentialStoreItem.md
Normal file
122
docs/Get-CredentialStoreItem.md
Normal file
@ -0,0 +1,122 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
Returns the Credential from a given remote host item.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Get-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Get-CredentialStoreItem [-Path <String>] -RemoteHost <String> [-Identifier <String>] [-Shared]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Return the credential as PSCredential object.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
$myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RemoteHost
|
||||
Specify the host, for which you would like to change the credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [System.Management.Automation.PSCredential]
|
||||
|
||||
## NOTES
|
||||
File Name : Get-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
122
docs/New-CredentialStore.md
Normal file
122
docs/New-CredentialStore.md
Normal file
@ -0,0 +1,122 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
Returns the Credential from a given remote host item.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Get-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Get-CredentialStoreItem [-Path <String>] -RemoteHost <String> [-Identifier <String>] [-Shared]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Return the credential as PSCredential object.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
$myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RemoteHost
|
||||
Specify the host, for which you would like to change the credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [System.Management.Automation.PSCredential]
|
||||
|
||||
## NOTES
|
||||
File Name : Get-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
140
docs/New-CredentialStoreItem.md
Normal file
140
docs/New-CredentialStoreItem.md
Normal file
@ -0,0 +1,140 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
Adds a credential store item containing host, user and password to the given store.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
New-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [-Credential <PSCredential>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
New-CredentialStoreItem [-Path <String>] -RemoteHost <String> [-Identifier <String>]
|
||||
[-Credential <PSCredential>] [-Shared] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
The credentials are stored without any relations to it's further use.
|
||||
If you need to change an existing
|
||||
item please use Set-CredentialStoreItem.
|
||||
You need to decide afterwards, whether to use the credential for
|
||||
a VIConnection, NetApp FAS or UCS Fabric Interconnect.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
New-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define the store in which you would like to add a new item.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RemoteHost
|
||||
The identifier or rather name for the given credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Credential
|
||||
You can provide credentials optionally as pre existing pscredential object.
|
||||
|
||||
```yaml
|
||||
Type: PSCredential
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
{{Fill Shared Description}}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## NOTES
|
||||
File Name : New-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
43
docs/PSCredentialStore.md
Normal file
43
docs/PSCredentialStore.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
Module Name: PSCredentialStore
|
||||
Module Guid: 6800e192-9df8-4e30-b253-eb2c799bbe84
|
||||
Download Help Link: {{Please enter FwLink manually}}
|
||||
Help Version: {{Please enter version of help manually (X.X.X.X) format}}
|
||||
Locale: en-US
|
||||
---
|
||||
|
||||
# PSCredentialStore Module
|
||||
## Description
|
||||
PSCredentialStore enables managing multiple PSCredential objects.
|
||||
|
||||
## PSCredentialStore Cmdlets
|
||||
### [Connect-To](Connect-To.md)
|
||||
Connects to the given host using the stored CredentialStoreItem.
|
||||
|
||||
### [Disconnect-From](Disconnect-From.md)
|
||||
Terminates a session established with Connect-To using a CredentialStoreItem.
|
||||
|
||||
### [Get-CredentialStore](Get-CredentialStore.md)
|
||||
Reads the complete content of the credential store and returns it as a new object.
|
||||
|
||||
### [Get-CredentialStoreItem](Get-CredentialStoreItem.md)
|
||||
Returns the Credential from a given remote host item.
|
||||
|
||||
### [Get-CredentialStoreItem](Get-CredentialStoreItem.md)
|
||||
Returns the Credential from a given remote host item.
|
||||
|
||||
### [New-CredentialStoreItem](New-CredentialStoreItem.md)
|
||||
Adds a credential store item containing host, user and password to the given store.
|
||||
|
||||
### [Remove-CredentialStoreItem](Remove-CredentialStoreItem.md)
|
||||
Remove the given credentials from the credential store.
|
||||
|
||||
### [Set-CredentialStoreItem](Set-CredentialStoreItem.md)
|
||||
Changes the credentials for the given remote host in the store.
|
||||
|
||||
### [Test-CredentialStore](Test-CredentialStore.md)
|
||||
Returns the credential store state.
|
||||
|
||||
### [Test-CredentialStoreItem](Test-CredentialStoreItem.md)
|
||||
Checks if the given RemoteHost identifier combination exists in the credential store.
|
||||
|
123
docs/Remove-CredentialStoreItem.md
Normal file
123
docs/Remove-CredentialStoreItem.md
Normal file
@ -0,0 +1,123 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
Remove the given credentials from the credential store.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Remove-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Remove-CredentialStoreItem [-Path <String>] -RemoteHost <String> [-Identifier <String>] [-Shared]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Use this CMDLet to completely remove an credential store item.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define the store in which your given host entry already exists.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RemoteHost
|
||||
Specify the host you for which you would like to change the credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
Defaults to "".
|
||||
Specify a string, which separates two CredentialStoreItems for the
|
||||
same hostname.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## NOTES
|
||||
File Name : Remove-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
123
docs/Set-CredentialStoreItem.md
Normal file
123
docs/Set-CredentialStoreItem.md
Normal file
@ -0,0 +1,123 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Set-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
Changes the credentials for the given remote host in the store.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Set-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Set-CredentialStoreItem [-Path <String>] -RemoteHost <String> [-Identifier <String>] [-Shared]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{Fill in the Description}}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
Set-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
Set-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define the store in which your given host entry already exists.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RemoteHost
|
||||
Specify the host you for which you would like to change the credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
Defaults to "".
|
||||
Specify a string, which separates two CredentialStoreItems for the
|
||||
same hostname.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## NOTES
|
||||
File Name : Set-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
88
docs/Test-CredentialStore.md
Normal file
88
docs/Test-CredentialStore.md
Normal file
@ -0,0 +1,88 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Test-CredentialStore
|
||||
|
||||
## SYNOPSIS
|
||||
Returns the credential store state.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Test-CredentialStore [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Test-CredentialStore [-Path <String>] [-Shared] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Use this script to test your credential store.
|
||||
For now it only checks if
|
||||
the file exists.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
## NOTES
|
||||
File Name : Test-CredentialStore.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
131
docs/Test-CredentialStoreItem.md
Normal file
131
docs/Test-CredentialStoreItem.md
Normal file
@ -0,0 +1,131 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Test-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
Checks if the given RemoteHost identifier combination exists in the credential store.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Test-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Test-CredentialStoreItem [-Path <String>] -RemoteHost <String> [-Identifier <String>] [-Shared]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Use this cmdlet for basic checks with a single item.
|
||||
Check the item first with this function before
|
||||
you try to interact with it.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### -------------------------- EXAMPLE 1 --------------------------
|
||||
```
|
||||
If (Test-CredentialStoreItem -RemoteHost "Default") {
|
||||
```
|
||||
|
||||
Get-CredentialStoreItem -RemoteHost "Default"
|
||||
}
|
||||
Else {
|
||||
Write-Warning ("The given Remote Host {0} does not exist in the credential Store!" -f $RemoteHost)
|
||||
}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Define a custom credential store you try to read from.
|
||||
Without the \`-Path\` parameter
|
||||
\`Test-CredentialStoreItem\` tries to read from the default private store.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RemoteHost
|
||||
Specify the host, for which you would like to change the credentials.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Identifier
|
||||
Adds an optional identifier to the given RemoteHost.
|
||||
Makes it possible to store multiple credentials
|
||||
for a single host.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
|
||||
## NOTES
|
||||
File Name : Test-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
94
docs/about_PSCredentialStore.md
Normal file
94
docs/about_PSCredentialStore.md
Normal file
@ -0,0 +1,94 @@
|
||||
# PSCredentialStore
|
||||
## about_PSCredentialStore
|
||||
|
||||
|
||||
# SHORT DESCRIPTION
|
||||
PSCredentialStore enables managing multiple PSCredential objects.
|
||||
|
||||
|
||||
# LONG DESCRIPTION
|
||||
The PSCredentialStore is an simple credential manager for PSCredentials. It stores multiple credential objects in a
|
||||
simple json file. You can choose between a private and shared store. The private one exists in your profile and can
|
||||
ony accessed by your account on the same machine. The shared store enables you to use different credentials for your
|
||||
script without exposing them as plain text.
|
||||
|
||||
**The shared store isn't 100% secure and I don't recommend using it in production!**
|
||||
|
||||
PSCredentialStore was developed to simplify the delegation of complex powershell scripts. In this case you often
|
||||
need to store credentials for non interactive usage like in scheduled tasks.
|
||||
|
||||
To get started read the [about_PSCredentialStore](/src/en-US/about_PSCredential.help.txt) page.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
## PowerShellGallery.com (Recommended Way)
|
||||
|
||||
* Make sure you use PowerShell 4.0 or higher with `$PSVersionTable`.
|
||||
* Use the builtin PackageManagement and install with: `Install-Module PSCredentialStore`
|
||||
* Done. Start exploring the Module with `Import-Module PSCredentialStore ; Get-Command -Module PSCredentialStore`
|
||||
|
||||
## Manual Way
|
||||
|
||||
* Take a look at the [Latest Release](https://github.com/OCram85/PSCredentialStore/releases/latest) page.
|
||||
* Download the `PSCredentialStore.zip`.
|
||||
* Unpack the Zip and put it in your Powershell Module path.
|
||||
* Don't forget to change the NTFS permission flag in the context menu.
|
||||
* Start with `Import-Module PSCredentialStore`
|
||||
|
||||
**1.** First we need a blank CredentialStore. You can decide between a *private* or *shared* store. The private
|
||||
Credential Store can only be accessed with your profile on the machine you created it.
|
||||
```powershell
|
||||
# Private Credential Store
|
||||
New-CredentialStore
|
||||
|
||||
# Shared Credential Store
|
||||
New-CredentialStore -Shared
|
||||
|
||||
#Shared CredentialStore in custom Location
|
||||
New-CredentialStore -Shared -Path 'C:\CredentialStore.json'
|
||||
```
|
||||
|
||||
**2.** Now you can manage your CredentialStoreItems:
|
||||
```powershell
|
||||
# This will prompt for credentials and stores it in a private store
|
||||
New-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
|
||||
|
||||
# You can now use it in other scripts like this:
|
||||
$DCCreds = Get-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
|
||||
Invoke-Command -ComputerName 'dc01.myside.local' -Credential $DCCreds -ScripBlock {Get-Process}
|
||||
```
|
||||
|
||||
The CredentialStore contains also a simple function to establish a connection with several systems or protocols.
|
||||
If you have already installed the underlying framework your can connect to:
|
||||
|
||||
* **CiscoUcs** - Establish a connection to a Cisco UCS fabric interconnect.
|
||||
* Required Modules: [`Cisco.UCS.Core`, `Cisco.UCSManager`](https://software.cisco.com/download/release.html?i=!y&mdfid=286305108&softwareid=284574017&release=2.1.1)
|
||||
* **FTP** - Establish a connection to a FTP host.
|
||||
* Required Modules: [`WinSCP`](https://www.powershellgallery.com/packages/WinSCP)
|
||||
* **NetAppFAS** - Establish a connection to a NetApp Clustered ONTAP filer.
|
||||
* Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926)
|
||||
* **VMware** - Establish a connection to a VMware vCenter or ESXi host.
|
||||
* Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI)
|
||||
|
||||
# EXAMPLES
|
||||
```powershell
|
||||
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
||||
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
|
||||
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
|
||||
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
|
||||
```
|
||||
|
||||
# NOTE
|
||||
|
||||
|
||||
# TROUBLESHOOTING NOTE
|
||||
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
|
||||
# KEYWORDS
|
||||
|
||||
- Credential
|
||||
- Store
|
@ -31,7 +31,7 @@
|
||||
Copyright = '(c) 2017 OCram85. All rights reserved.'
|
||||
|
||||
# Description of the functionality provided by this module
|
||||
Description = 'A simple credential manager to store and reuse multiple credential objecs'
|
||||
Description = 'A simple credential manager to store and reuse multiple credential objects.'
|
||||
|
||||
# Minimum version of the Windows PowerShell engine required by this module
|
||||
PowerShellVersion = '4.0'
|
||||
|
Loading…
Reference in New Issue
Block a user