forked from OCram85/PSCredentialStore
Publish version 1.0.x (#45)
## About ## Content (Micro Commits) * fixes #38 * fixes #44 * Implement precise lookup hierarchy (fixes #43) * align pester test with #43 logic * split cert functions * use new cert functions for save an lookup * fix pester tests * [wip] * fix var name ref * fix exports * fix cert store location for windows shared mode * fix mandatory params * fix accidentially removed code block * add basic cert pester pests * remove old docs * update cbh blocks * update cbh blocks * update docs * move .net wrapper forpfx files * do not export .net wrapper functions * update docs * rename tests * fix private functions location * - fixes #44: FTP connection * add link to reference * add format files * add preview version shield * update markdown help files (platyps) * add emoji images in captions * fix typos * fix typos * fix typo * prepare version numbers
This commit is contained in:
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Connect-To
|
||||
|
||||
## SYNOPSIS
|
||||
@ -14,14 +7,14 @@ Connects to the given host using the stored CredentialStoreItem.
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>]
|
||||
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>] [-PassThru]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>]
|
||||
[-Path <String>] [-Shared] [<CommonParameters>]
|
||||
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>] [-Shared]
|
||||
[-Path <String>] [-PassThru] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
@ -29,37 +22,37 @@ Establish a connection to the selected host using a stored CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
### BEISPIEL 2
|
||||
```
|
||||
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
|
||||
```
|
||||
|
||||
### EXAMPLE 3
|
||||
### BEISPIEL 3
|
||||
```
|
||||
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
|
||||
```
|
||||
|
||||
### EXAMPLE 4
|
||||
### BEISPIEL 4
|
||||
```
|
||||
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
|
||||
```
|
||||
|
||||
### EXAMPLE 5
|
||||
### BEISPIEL 5
|
||||
```
|
||||
Connect-To -RemoteHost "vCenter.myside.local" -Type CisServer
|
||||
```
|
||||
|
||||
### EXAMPLE 6
|
||||
### BEISPIEL 6
|
||||
```
|
||||
Connect-To -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP
|
||||
```
|
||||
|
||||
### EXAMPLE 7
|
||||
### BEISPIEL 7
|
||||
```
|
||||
Connect-To -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS
|
||||
```
|
||||
@ -102,6 +95,21 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
Returns the value from the underlying connection type function.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
|
||||
@ -112,7 +120,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -142,7 +150,7 @@ Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
@ -167,20 +175,18 @@ 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).
|
||||
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 :
|
||||
- File Name : Connect-To.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Disconnect-From
|
||||
|
||||
## SYNOPSIS
|
||||
@ -21,42 +14,42 @@ Terminates a session established with Connect-To using a CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Disconnect-From -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
### BEISPIEL 2
|
||||
```
|
||||
Disconnect-From -RemoteHost "ftp.myside.local" -Type FTP
|
||||
```
|
||||
|
||||
### EXAMPLE 3
|
||||
### BEISPIEL 3
|
||||
```
|
||||
Disconnect-From -RemoteHost "fas.myside.local" -Type NetAppFAS
|
||||
```
|
||||
|
||||
### EXAMPLE 4
|
||||
### BEISPIEL 4
|
||||
```
|
||||
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware
|
||||
```
|
||||
|
||||
### EXAMPLE 5
|
||||
### BEISPIEL 5
|
||||
```
|
||||
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True
|
||||
```
|
||||
|
||||
### EXAMPLE 6
|
||||
### BEISPIEL 6
|
||||
```
|
||||
Disconnect-From -RemoteHost "vcenter.myside.local" -Type CisServer
|
||||
```
|
||||
|
||||
### EXAMPLE 7
|
||||
### BEISPIEL 7
|
||||
```
|
||||
Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP
|
||||
```
|
||||
|
||||
### EXAMPLE 8
|
||||
### BEISPIEL 8
|
||||
```
|
||||
Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS
|
||||
```
|
||||
@ -111,20 +104,18 @@ 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).
|
||||
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-From.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
- File Name : Disconnect-From.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
71
docs/Get-CSCertificate.md
Normal file
71
docs/Get-CSCertificate.md
Normal file
@ -0,0 +1,71 @@
|
||||
# Get-CSCertificate
|
||||
|
||||
## SYNOPSIS
|
||||
Returns the current used valid PfX certificate.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-CSCertificate [-Type] <String> [-Thumbprint] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Use this function to get the available pfx certificate respecting the config hierarchy.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Get-CSCertificate -Type 'Shared' -Thumbprint '12334456'
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Thumbprint
|
||||
Provide the credentials thumbprint for the search.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
Select the current credential store type.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
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.Security.Cryptography.X509Certificates.X509Certificate2]
|
||||
## NOTES
|
||||
- File Name : Get-CSCertificate.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CredentialStore
|
||||
|
||||
## SYNOPSIS
|
||||
@ -31,7 +24,7 @@ Get-CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
$CSContent = Get-CredentialStore -Path "C:\TMP\mystore.json"
|
||||
```
|
||||
@ -48,7 +41,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -71,22 +64,18 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : Get-CredentialStore.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
@ -28,7 +21,7 @@ Return the credential as PSCredential object.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
$myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
@ -63,7 +56,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -101,22 +94,18 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : Get-CredentialStoreItem.ps1
|
||||
- Author : Messing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
72
docs/Import-CSCertificate.md
Normal file
72
docs/Import-CSCertificate.md
Normal file
@ -0,0 +1,72 @@
|
||||
# Import-CSCertificate
|
||||
|
||||
## SYNOPSIS
|
||||
Imports a linked certificate to the valid store location.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Import-CSCertificate [-Type] <String> [-Path] <FileInfo> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Import-CSCertificate takes a pfx certificate file and imports it to the supposed certificate store for
|
||||
private and shared credential stores.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Import-CSCertificate -Type 'Private' -Path (Join-Path -Path $Env:APPDATA -ChildItem 'PfxCertificate.pfx')
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Path
|
||||
Provide a valid path to pfx certificate file.
|
||||
|
||||
```yaml
|
||||
Type: FileInfo
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
Select between the a private and shared credential store.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
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 : Import-CSCertificate.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
147
docs/New-CSCertAttribute.md
Normal file
147
docs/New-CSCertAttribute.md
Normal file
@ -0,0 +1,147 @@
|
||||
# New-CSCertAttribute
|
||||
|
||||
## SYNOPSIS
|
||||
Creates required data for a certificate signing request.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
New-CSCertAttribute [-Country] <String> [-State] <String> [-City] <String> [-Organization] <String>
|
||||
[-OrganizationalUnitName] <String> [-CommonName] <String> [[-Days] <Int32>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Defines the certificate related properties for an upcoming New-PfxCertificate execution.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### BEISPIEL 1
|
||||
```
|
||||
New-CSCertAttribute -Country 'DE' -State 'BW' -City 'Karlsruhe' -Organization 'AwesomeIT' -OrganizationalUnitName '' -CommonName 'MyPrivateCert'
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -City
|
||||
Certificate city value.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -CommonName
|
||||
The certificate common name.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Country
|
||||
County code like EN, DE, IT, FR...
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Days
|
||||
The validation time itself.
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 7
|
||||
Default value: 365
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Organization
|
||||
Certificate organization value.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -OrganizationalUnitName
|
||||
Certificate OrganizationalUnitName value.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -State
|
||||
Certificate state value.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
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
|
||||
|
||||
### [PSCredentialStore.Certificate.CSRDetails]
|
||||
## NOTES
|
||||
- File Name : New-CSCertAttribute.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
120
docs/New-CSCertificate.md
Normal file
120
docs/New-CSCertificate.md
Normal file
@ -0,0 +1,120 @@
|
||||
# New-CSCertificate
|
||||
|
||||
## SYNOPSIS
|
||||
Creates a new PFX certificate for the CredentialStore encryption.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
New-CSCertificate [-CRTAttribute] <Object> [[-KeyName] <String>] [[-CertName] <String>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Use this function to create a custom self signed certificate used by the PSCredentialStore module.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### BEISPIEL 1
|
||||
```
|
||||
New-CSCertificate -CRTAttribute $CRTAttribute -KeyName './myprivate.key' -CertName './mycert.pfx'
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -CertName
|
||||
Provide a custom full path and name for the PFX certificate file.
|
||||
The file extension has to be \`*.pfx\`
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: ./certificate.pfx
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -CRTAttribute
|
||||
Provide certificate related attributes provided by function New-CRTAttribute.
|
||||
|
||||
```yaml
|
||||
Type: Object
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -KeyName
|
||||
Provide a custom full path and name for the private key.
|
||||
The file extension has to be \`*.key\`.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: ./private.key
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
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
|
||||
|
||||
### [PSCredentialStore.Certificate.Attribute]
|
||||
## OUTPUTS
|
||||
|
||||
### [None]
|
||||
## NOTES
|
||||
- File Name : New-CSCertificate.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
@ -1,92 +1,111 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CredentialStoreItem
|
||||
# New-CredentialStore
|
||||
|
||||
## SYNOPSIS
|
||||
Returns the Credential from a given remote host item.
|
||||
Creates a new credential store File
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Get-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [<CommonParameters>]
|
||||
New-CredentialStore [-Force] [-PassThru] [-SkipPFXCertCreation] [-UseCertStore] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Get-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [-Shared] [-Path <String>]
|
||||
[<CommonParameters>]
|
||||
New-CredentialStore [-Shared] [-Path <FileInfo>] [-Force] [-PassThru] [-SkipPFXCertCreation] [-UseCertStore]
|
||||
[-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Return the credential as PSCredential object.
|
||||
You need to run this script first to create a new credential store before you try to
|
||||
save new credentials with New-CredentialStoreItem.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
$myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
New-CredentialStore
|
||||
```
|
||||
|
||||
# Creates a new private CredentialStore
|
||||
|
||||
### BEISPIEL 2
|
||||
```
|
||||
New-CredentialStore -Force
|
||||
```
|
||||
|
||||
# Resets an existing private CredentialStore
|
||||
|
||||
### BEISPIEL 3
|
||||
```
|
||||
New-CredentialStore -Shared
|
||||
```
|
||||
|
||||
# Creates a new shared CredentialStore
|
||||
|
||||
### BEISPIEL 4
|
||||
```
|
||||
New-CredentialStore -Shared -Path "C:\TMP\CredentialStore.json"
|
||||
```
|
||||
|
||||
# Creates a new shared CredentialStore in the given location.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -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
|
||||
### -Force
|
||||
Use this switch to reset an existing store.
|
||||
The complete content will be wiped.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
{{ Fill PassThru Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Path
|
||||
Define a custom path to a shared CredentialStore.
|
||||
Define a location for the new shared CredentialStore.
|
||||
The default store will be created in
|
||||
$Env:ProgramData\PSCredentialStore dir.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Type: FileInfo
|
||||
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
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Switch to shared mode with this param.
|
||||
This enforces the command to work with a shared CredentialStore which
|
||||
can be decrypted across systems.
|
||||
Creates a CredentialStore in the Shared mode.
|
||||
This enables you to read the CredentialStore Items on
|
||||
different systems or profiles.
|
||||
In addition you can optionally provide a custom path wit the -Path parameter.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@ -100,23 +119,86 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipPFXCertCreation
|
||||
You can skip the pfx certificate creation process.
|
||||
This makes sense if you have a previously created cert or want to
|
||||
import a cert in cross-platform environments.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -UseCertStore
|
||||
Instead of using a plain pfx file beside your CredentialStore file you can import it into the user or machine
|
||||
certificate store.
|
||||
In this case the system itself secures the cert and you don't hat to set custom NTFS
|
||||
permissions so secure your shared certificate.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
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).
|
||||
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]
|
||||
|
||||
### ['PSCredentialStore.Store'] Returns the recently created CredentialStore object if the -PassThru parameter
|
||||
### was given.
|
||||
## NOTES
|
||||
\`\`\`
|
||||
File Name : Get-CredentialStoreItem.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
\`\`\`
|
||||
- File Name : New-CredentialStore.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
@ -33,7 +26,7 @@ a VIConnection, NetApp FAS or UCS Fabric Interconnect.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
New-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
@ -83,7 +76,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -104,7 +97,9 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
{{Fill Shared Description}}
|
||||
Define the CredentialStore where you want to add the new item.
|
||||
Default is always personal but can be
|
||||
changed to shared, or even shared with custom path.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@ -119,22 +114,18 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : New-CredentialStoreItem.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,14 +1,6 @@
|
||||
---
|
||||
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
|
||||
{{Manually Enter Description Here}}
|
||||
[about_PSCredentialStore](about_PSCredentialStore.md)
|
||||
|
||||
## PSCredentialStore Cmdlets
|
||||
### [Connect-To](Connect-To.md)
|
||||
@ -23,12 +15,24 @@ Reads the complete content of the credential store and returns it as a new objec
|
||||
### [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.
|
||||
### [Get-CSCertificate](Get-CSCertificate.md)
|
||||
Returns the current used valid PfX certificate.
|
||||
|
||||
### [Import-CSCertificate](Import-CSCertificate.md)
|
||||
Imports a linked certificate to the valid store location.
|
||||
|
||||
### [Import-CSCertificate](Import-CSCertificate.md)
|
||||
Imports a linked certificate to the valid store location.
|
||||
|
||||
### [New-CredentialStoreItem](New-CredentialStoreItem.md)
|
||||
Adds a credential store item containing host, user and password to the given store.
|
||||
|
||||
### [New-CSCertAttribute](New-CSCertAttribute.md)
|
||||
Creates required data for a certificate signing request.
|
||||
|
||||
### [New-CSCertificate](New-CSCertificate.md)
|
||||
Creates a new PFX certificate for the CredentialStore encryption.
|
||||
|
||||
### [Remove-CredentialStoreItem](Remove-CredentialStoreItem.md)
|
||||
Remove the given credentials from the credential store.
|
||||
|
||||
@ -41,6 +45,12 @@ Returns the credential store state.
|
||||
### [Test-CredentialStoreItem](Test-CredentialStoreItem.md)
|
||||
Checks if the given RemoteHost identifier combination exists in the credential store.
|
||||
|
||||
### [Test-CSCertificate](Test-CSCertificate.md)
|
||||
Tests if the linked certificate is store ein the specified cert stores.
|
||||
|
||||
### [Test-CSConnection](Test-CSConnection.md)
|
||||
Returns the connection state of a given type to the remote host.
|
||||
|
||||
### [Use-CSCertificate](Use-CSCertificate.md)
|
||||
Links an existing PFX Certificate to a CredentialStore.
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
@ -28,12 +21,25 @@ Use this CMDLet to completely remove an credential store item.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
Remove-CredentialStoreItem -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc
|
||||
### BEISPIEL 2
|
||||
```
|
||||
Remove-CredentialStoreItem -Shared -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
### BEISPIEL 3
|
||||
```
|
||||
Remove-CredentialStoreItem -Shared -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
### BEISPIEL 4
|
||||
```
|
||||
Remove-CredentialStoreItem -RemoteHost "esx01.myside.local" -Identifier svc
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
@ -64,7 +70,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -102,22 +108,18 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : Remove-CredentialStoreItem.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Set-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
@ -25,21 +18,24 @@ Set-CredentialStoreItem -RemoteHost <String> [-Identifier <String>] [-Credential
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{Fill in the Description}}
|
||||
Use this function to update your already stored RemoteHost items.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Set-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
|
||||
```
|
||||
|
||||
### BEISPIEL 2
|
||||
```
|
||||
Set-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Credential
|
||||
{{Fill Credential Description}}
|
||||
Provided the new credentials you want to update inside the RemoteHost item.
|
||||
|
||||
```yaml
|
||||
Type: PSCredential
|
||||
@ -80,7 +76,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -118,22 +114,18 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : Set-CredentialStoreItem.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
56
docs/Test-CSCertificate.md
Normal file
56
docs/Test-CSCertificate.md
Normal file
@ -0,0 +1,56 @@
|
||||
# Test-CSCertificate
|
||||
|
||||
## SYNOPSIS
|
||||
Tests if the linked certificate is store ein the specified cert stores.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Test-CSCertificate [-Type] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Test-CSCertificate should be an easy high level test for the linked certificate.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Test-CSCertificate -Type 'Shared'
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Type
|
||||
Select between 'Private' or 'Shared'.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
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
|
||||
|
||||
### [bool]
|
||||
## NOTES
|
||||
- File Name : Test-CSCertificate.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Test-CSConnection
|
||||
|
||||
## SYNOPSIS
|
||||
@ -21,9 +14,9 @@ Use this script to check a connection which was established with the \`Connect-T
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
.\Test-CMConnection -RemoteHost "r0-i01-vcr01.p0r.kivbf-cloud.net" -Type VMware
|
||||
Test-CMConnection -RemoteHost "vcr01.internal.net" -Type VMware
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
@ -61,20 +54,18 @@ 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).
|
||||
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
|
||||
|
||||
### [Boolean]
|
||||
|
||||
### [bool]
|
||||
## NOTES
|
||||
File Name : Test-CSConnection.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
- File Name : Test-CSConnection.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Test-CredentialStore
|
||||
|
||||
## SYNOPSIS
|
||||
@ -29,12 +22,10 @@ the file exists.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Test-CredentialStore -eq $true
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
@ -48,7 +39,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@ -71,18 +62,16 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : Test-CredentialStore.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
---
|
||||
external help file: PSCredentialStore-help.xml
|
||||
Module Name: PSCredentialStore
|
||||
online version: https://github.com/OCram85/PSCredentialStore
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Test-CredentialStoreItem
|
||||
|
||||
## SYNOPSIS
|
||||
@ -30,7 +23,7 @@ you try to interact with it.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
### BEISPIEL 1
|
||||
```
|
||||
If (Test-CredentialStoreItem -RemoteHost "Default") {
|
||||
```
|
||||
@ -110,22 +103,18 @@ 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).
|
||||
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 :
|
||||
\`\`\`
|
||||
- File Name : Test-CredentialStoreItem.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
|
107
docs/Use-CSCertificate.md
Normal file
107
docs/Use-CSCertificate.md
Normal file
@ -0,0 +1,107 @@
|
||||
# Use-CSCertificate
|
||||
|
||||
## SYNOPSIS
|
||||
Links an existing PFX Certificate to a CredentialStore.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Private (Default)
|
||||
```
|
||||
Use-CSCertificate -Path <String> [-UseCertStore] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Shared
|
||||
```
|
||||
Use-CSCertificate -Path <String> [-CredentialStore <String>] [-Shared] [-UseCertStore] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Linking a certificate is needed if you plan to use the same CredentialStore in cross platform scenarios.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### BEISPIEL 1
|
||||
```
|
||||
Use-CSCertificate -Path 'C:\cert.pfx'
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -CredentialStore
|
||||
Specify a custom path for a shared credential store.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Path
|
||||
Specify the path to the PFX Certificate you want to link for usage.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Shared
|
||||
Use the credential store in shared mode.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Shared
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -UseCertStore
|
||||
Use the given certificate and import it into the corresponding certificate store.
|
||||
|
||||
```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 : Use-CSCertificate.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# PSCredentialStore
|
||||
# PSCredentialStore
|
||||
## about_PSCredentialStore
|
||||
|
||||
|
||||
@ -7,24 +7,30 @@ 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
|
||||
The PSCredentialStore is a simple credential manager for `PSCredential` objects. It stores PSCredentials in a simple json
|
||||
file. You can choose between a private and shared credential 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!**
|
||||
scripts without exposing them as plain text.
|
||||
|
||||
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.
|
||||
Starting with version `1.0.0` PSCredential uses Pfx certificates fo encryption. You can use Pfx certificate files
|
||||
or certificates stored in the certificate store.
|
||||
|
||||
For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStore.md) page on github or via CLI with
|
||||
`Get-Help about_PSCredentialStore`.
|
||||
|
||||
## Requirements
|
||||
|
||||
- PowerShell >= `5.1`
|
||||
- .NET Framework >= `4.6` or .NET Core >= `1.0`
|
||||
|
||||
## Installation
|
||||
|
||||
## PowerShellGallery.com (Recommended Way)
|
||||
|
||||
* Make sure you use PowerShell 4.0 or higher with `$PSVersionTable`.
|
||||
* Make sure you use PowerShell 5.1 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`
|
||||
|
||||
@ -36,19 +42,28 @@ To get started read the [about_PSCredentialStore](/src/en-US/about_PSCredential.
|
||||
* 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
|
||||
**1.** First we need a blank credential store. 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.
|
||||
|
||||
Starting with version `1.0.0` you can decide the storage type of your fresh created certificate. As default
|
||||
PSCredentialStore creates a new pfx certificate file beside the credential store itself. Optionally you can provide
|
||||
the parameter `-UseCertStore`. This imports the new certificate in the user or machine certificate store as well.
|
||||
|
||||
```powershell
|
||||
# Private Credential Store
|
||||
# Private credential store
|
||||
New-CredentialStore
|
||||
|
||||
# Shared Credential Store
|
||||
# Private credential store with certificate store usage
|
||||
New-CredentialStore -UseCertStore
|
||||
|
||||
# Shared credential rtore
|
||||
New-CredentialStore -Shared
|
||||
|
||||
#Shared CredentialStore in custom Location
|
||||
#Shared credential store 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
|
||||
|
Reference in New Issue
Block a user