Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit fdc6651

Browse files
authored
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
1 parent d92d963 commit fdc6651

55 files changed

Lines changed: 1584 additions & 661 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,50 @@
1-
[![AppVeyor branch](https://img.shields.io/appveyor/ci/OCram85/PSCredentialStore/master.svg?style=plastic "Master Banch Build Status")](https://ci.appveyor.com/project/OCram85/pscredentialstore/branch/master)
1+
[![AppVeyor branch](https://img.shields.io/appveyor/ci/OCram85/PSCredentialStore/master.svg?style=plastic "Master Branch Build Status")](https://ci.appveyor.com/project/OCram85/pscredentialstore/branch/master)
22
[![AppVeyor tests branch](https://img.shields.io/appveyor/tests/OCram85/PSCredentialStore/master.svg?style=plastic "Pester Tests Results")](https://ci.appveyor.com/project/OCram85/pscredentialstore/branch/master/tests)
33
[![Coveralls github](https://img.shields.io/coveralls/github/OCram85/PSCredentialStore.svg?style=plastic "Coveralls.io Coverage Report")](https://coveralls.io/github/OCram85/PSCredentialStore?branch=master)
44
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/PSCredentialStore.svg?style=plastic "PowershellGallery Published Version")](https://www.powershellgallery.com/packages/PSCredentialStore)
5+
[![PowerShell Gallery](https://img.shields.io/powershellgallery/vpre/PSCredentialStore.svg?label=latest%20preview&style=plastic "PowershellGallery Latest Preview Version")](https://www.powershellgallery.com/packages/PSCredentialStore)
56
[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSCredentialStore.svg?style=plastic "PowershellGallery Downloads")](https://www.powershellgallery.com/packages/PSCredentialStore)
67

78
![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)
89
![forthebadge](http://forthebadge.com/images/badges/for-you.svg)
910

10-
General
11+
:key: General
1112
=======
1213

13-
The PSCredentialStore is a simple credential manager for PSCredentials. It stores PSCredentials in a simple json
14+
The PSCredentialStore is a simple credential manager for `PSCredential` objects. It stores PSCredentials in a simple json
1415
file. You can choose between a private and shared credential store. The private one exists in your profile and can
1516
ony accessed by your account on the same machine. The shared store enables you to use different credentials for your
1617
scripts without exposing them as plain text.
1718

18-
**The shared store isn't 100% secure and I don't recommend using it in production!**
19-
2019
PSCredentialStore was developed to simplify the delegation of complex powershell scripts. In this case you often
2120
need to store credentials for non interactive usage like in scheduled tasks.
2221

22+
Starting with version `1.0.0` PSCredential uses Pfx certificates fo encryption. You can use Pfx certificate files
23+
or certificates stored in the certificate store.
24+
2325
For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStore.md) page on github or via CLI with
2426
`Get-Help about_PSCredentialStore`.
2527

26-
:exclamation: Upcoming Changes :exclamation:
27-
================
28+
You can find the [reference](/docs/PSCredentialStore.md) in the /docs/ path as well.
2829

29-
The will be some breaking changes starting with the `0.5.0.xxx`:
30+
:vulcan_salute: Requirements
31+
============
3032

31-
- **PSCredentialStore will use PFX certificates to encrypt your credentials.**
32-
- This replaces the the current encryption methods and you need to recreate or upgrade your pre existing stores.
33-
- The changes allows the PSCredentialStore module to support the PowerShell `Core` editions.
34-
- Yes this means, you can use the module on any PowerShell 6 supported linux distribution.
35-
- It's also possible to create a shared credential store and transfer it onto a another platform like:
36-
`Windows -- to --> Linux` and vice versa.
37-
- Automatically creates self signed certificate with 2048 bits RSA keys for encryption.
33+
- PowerShell >= `5.1`
34+
- .NET Framework >= `4.6` or .NET Core >= `1.0`
3835

39-
Installation
36+
:hammer_and_wrench: Installation
4037
============
4138

42-
PowerShellGallery.com (Recommended Way)
39+
:artificial_satellite: PowerShellGallery.com (Recommended Way)
4340
---------------------------------------
4441

4542
* Make sure you use PowerShell 5.1 or higher with `$PSVersionTable`.
4643
* Use the builtin PackageManagement and install with: `Import-Module PowerShellGet; Install-Module 'PSCredentialStore' -Repository 'PSGallery'`
4744
* Additionally use the `-AllowPrerelease` switch until we publish the final release!
4845
* Done. Start exploring the Module with `Import-Module PSCredentialStore ; Get-Command -Module PSCredentialStore`
4946

50-
Manual Way
47+
:building_construction: Manual Way
5148
----------
5249

5350
* Take a look at the [Latest Release](https://github.com/OCram85/PSCredentialStore/releases/latest) page.
@@ -56,19 +53,27 @@ Manual Way
5653
* Don't forget to change the NTFS permission flag in the context menu.
5754
* Start with `Import-Module PSCredentialStore`
5855

59-
Quick Start
56+
:sparkles: Quick Start
6057
-----------
6158

6259
**1.** First we need a blank credential store. You can decide between a *private* or *shared* store. The private
6360
Credential Store can only be accessed with your profile on the machine you created it.
61+
62+
Starting with version `1.0.0` you can decide the storage type of your fresh created certificate. As default
63+
PSCredentialStore creates a new pfx certificate file beside the credential store itself. Optionally you can provide
64+
the parameter `-UseCertStore`. This imports the new certificate in the user or machine certificate store as well.
65+
6466
```powershell
6567
# Private credential store
6668
New-CredentialStore
6769
68-
# Shared credential rtore
70+
# Private credential store with certificate store usage
71+
New-CredentialStore -UseCertStore
72+
73+
# Shared credential store
6974
New-CredentialStore -Shared
7075
71-
#Shared credential store in custom Location
76+
#Shared credential store in custom location
7277
New-CredentialStore -Shared -Path 'C:\CredentialStore.json'
7378
```
7479

@@ -110,14 +115,17 @@ Connect-To -RemoteHost "ftp.myside.local" -Type FTP
110115
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
111116
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
112117
Connect-To -RemoteHost "vcr.myside.local" -Type CisServer
118+
Connect-To -RemoteHost "exchange1.myside.local" -Type ExchangeHTTP
119+
Connect-To -RemoteHost "exchange1.myside.local" -Type ExchangeHTTPS
120+
Connect-To -RemoteHost "ubuntu.myside.local" -Type SCP
113121
```
114122

115-
Credits
123+
:pushpin: Credits
116124
-------
117125

118126
A huge thanks to all the people who helped with their projects and indirect contributions which made this possible!
119127

120-
- This module is inspired by the awesome work of @dlwyatt with articles like these:
128+
- This module is inspired by the awesome work of Dave Wyatt ([@dlwyatt](https://github.com/dlwyatt)) with articles like these:
121129
- https://powershell.org/2013/11/24/saving-passwords-and-preventing-other-processes-from-decrypting-them/
122130
- https://powershell.org/2014/02/01/revisited-powershell-and-encryption/
123131
- The awesome people from [LibreSSL](http://www.libressl.org/) which publishes the [portable openssl/libressl binaries](https://github.com/libressl-portable/portable)!

appveyor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# release version:
2-
#version: 0.5.0.{build}
3-
41
# pre release version:
5-
version: 0.5.{build}
2+
version: 1.0.{build}
63

74
#branches:
85
# only:

docs/Connect-To.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
external help file: PSCredentialStore-help.xml
3-
Module Name: PSCredentialStore
4-
online version: https://github.com/OCram85/PSCredentialStore
5-
schema: 2.0.0
6-
---
7-
81
# Connect-To
92

103
## SYNOPSIS
@@ -14,52 +7,52 @@ Connects to the given host using the stored CredentialStoreItem.
147

158
### Private (Default)
169
```
17-
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>]
10+
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>] [-PassThru]
1811
[<CommonParameters>]
1912
```
2013

2114
### Shared
2215
```
23-
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>]
24-
[-Path <String>] [-Shared] [<CommonParameters>]
16+
Connect-To -RemoteHost <String> [-Identifier <String>] -Type <String> [-Credentials <PSCredential>] [-Shared]
17+
[-Path <String>] [-PassThru] [<CommonParameters>]
2518
```
2619

2720
## DESCRIPTION
2821
Establish a connection to the selected host using a stored CredentialStoreItem.
2922

3023
## EXAMPLES
3124

32-
### EXAMPLE 1
25+
### BEISPIEL 1
3326
```
3427
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
3528
```
3629

37-
### EXAMPLE 2
30+
### BEISPIEL 2
3831
```
3932
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
4033
```
4134

42-
### EXAMPLE 3
35+
### BEISPIEL 3
4336
```
4437
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
4538
```
4639

47-
### EXAMPLE 4
40+
### BEISPIEL 4
4841
```
4942
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
5043
```
5144

52-
### EXAMPLE 5
45+
### BEISPIEL 5
5346
```
5447
Connect-To -RemoteHost "vCenter.myside.local" -Type CisServer
5548
```
5649

57-
### EXAMPLE 6
50+
### BEISPIEL 6
5851
```
5952
Connect-To -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP
6053
```
6154

62-
### EXAMPLE 7
55+
### BEISPIEL 7
6356
```
6457
Connect-To -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS
6558
```
@@ -102,6 +95,21 @@ Accept pipeline input: False
10295
Accept wildcard characters: False
10396
```
10497
98+
### -PassThru
99+
Returns the value from the underlying connection type function.
100+
101+
```yaml
102+
Type: SwitchParameter
103+
Parameter Sets: (All)
104+
Aliases:
105+
106+
Required: False
107+
Position: Named
108+
Default value: False
109+
Accept pipeline input: False
110+
Accept wildcard characters: False
111+
```
112+
105113
### -Path
106114
Define a custom path to a shared CredentialStore.
107115
@@ -112,7 +120,7 @@ Aliases:
112120

113121
Required: False
114122
Position: Named
115-
Default value: "{0}\PSCredentialStore\CredentialStore.json" -f $env:ProgramData
123+
Default value: None
116124
Accept pipeline input: False
117125
Accept wildcard characters: False
118126
```
@@ -142,7 +150,7 @@ Type: SwitchParameter
142150
Parameter Sets: Shared
143151
Aliases:
144152

145-
Required: False
153+
Required: True
146154
Position: Named
147155
Default value: False
148156
Accept pipeline input: False
@@ -167,20 +175,18 @@ Accept wildcard characters: False
167175
```
168176
169177
### CommonParameters
170-
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).
178+
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).
171179
172180
## INPUTS
173181
174182
### [None]
175-
176183
## OUTPUTS
177184
178185
### [None]
179-
180186
## NOTES
181-
File Name : Connect-To.ps1
182-
Author : Marco Blessing - marco.blessing@googlemail.com
183-
Requires :
187+
- File Name : Connect-To.ps1
188+
- Author : Marco Blessing - marco.blessing@googlemail.com
189+
- Requires :
184190
185191
## RELATED LINKS
186192

docs/Disconnect-From.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
external help file: PSCredentialStore-help.xml
3-
Module Name: PSCredentialStore
4-
online version: https://github.com/OCram85/PSCredentialStore
5-
schema: 2.0.0
6-
---
7-
81
# Disconnect-From
92

103
## SYNOPSIS
@@ -21,42 +14,42 @@ Terminates a session established with Connect-To using a CredentialStoreItem.
2114

2215
## EXAMPLES
2316

24-
### EXAMPLE 1
17+
### BEISPIEL 1
2518
```
2619
Disconnect-From -RemoteHost "ucs.myside.local" -Type CiscoUcs
2720
```
2821

29-
### EXAMPLE 2
22+
### BEISPIEL 2
3023
```
3124
Disconnect-From -RemoteHost "ftp.myside.local" -Type FTP
3225
```
3326

34-
### EXAMPLE 3
27+
### BEISPIEL 3
3528
```
3629
Disconnect-From -RemoteHost "fas.myside.local" -Type NetAppFAS
3730
```
3831

39-
### EXAMPLE 4
32+
### BEISPIEL 4
4033
```
4134
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware
4235
```
4336

44-
### EXAMPLE 5
37+
### BEISPIEL 5
4538
```
4639
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True
4740
```
4841

49-
### EXAMPLE 6
42+
### BEISPIEL 6
5043
```
5144
Disconnect-From -RemoteHost "vcenter.myside.local" -Type CisServer
5245
```
5346

54-
### EXAMPLE 7
47+
### BEISPIEL 7
5548
```
5649
Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP
5750
```
5851

59-
### EXAMPLE 8
52+
### BEISPIEL 8
6053
```
6154
Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS
6255
```
@@ -111,20 +104,18 @@ Accept wildcard characters: False
111104
```
112105
113106
### CommonParameters
114-
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).
107+
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).
115108
116109
## INPUTS
117110
118111
### [None]
119-
120112
## OUTPUTS
121113
122114
### [None]
123-
124115
## NOTES
125-
File Name : Disconnect-From.ps1
126-
Author : Marco Blessing - marco.blessing@googlemail.com
127-
Requires :
116+
- File Name : Disconnect-From.ps1
117+
- Author : Marco Blessing - marco.blessing@googlemail.com
118+
- Requires :
128119
129120
## RELATED LINKS
130121

0 commit comments

Comments
 (0)