fix Test-CredentialStoreItem return #66

Merged
OCram85 merged 2 commits from fixTestItem into master 2022-07-19 11:46:22 +02:00
19 changed files with 2057 additions and 2022 deletions

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---
@ -23,7 +24,15 @@ Defines the certificate related properties for an upcoming New-PfxCertificate ex
### EXAMPLE 1
```
New-CSCertAttribute -Country 'DE' -State 'BW' -City 'Karlsruhe' -Organization 'AwesomeIT' -OrganizationalUnitName '' -CommonName 'MyPrivateCert'
$AttribParams = @{
Country = 'DE'
State = 'BW'
City = 'Karlsruhe'
Organization ='AwesomeIT'
OrganizationalUnitName ='PSCredentialStore'
CommonName ='MyPrivateCert'
}
New-CSCertAttribute @AttribParams
```
## PARAMETERS

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---
@ -123,8 +124,8 @@ 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.
This makes sense if you have a previously created cert
or want to import a cert in cross-platform environments.
```yaml
Type: SwitchParameter
@ -139,10 +140,10 @@ 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.
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

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,14 +1,14 @@
---
Module Name: PSCredentialStore
Module Guid: 6800e192-9df8-4e30-b253-eb2c799bbe84 6800e192-9df8-4e30-b253-eb2c799bbe84
Module Guid: 6800e192-9df8-4e30-b253-eb2c799bbe84
Download Help Link: {{ Update Download Link }}
Help Version: {{ Please enter version of help manually (X.X.X.X) format }}
Help Version: {{ Update Help Version }}
Locale: en-US
---
# PSCredentialStore Module
## Description
{{ Fill in the Description }}
See global Readme file for usage instructions.
## PSCredentialStore Cmdlets
### [Connect-To](Connect-To.md)

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---
@ -27,6 +28,12 @@ Use this cmdlet for basic checks with a single item.
Check the item first with this function before
you try to interact with it.
> :bulb: Breaking Change for \`v1.1.0+\`:
>
> Test-CredentialStoreItem will return \`$false\` even if the store doesn't exist.
> We removed the terminating
> error and replaced it with a warning message.
## EXAMPLES
### EXAMPLE 1

View File

@ -1,6 +1,7 @@
---
external help file: PSCredentialStore-help.xml
external help file: ModuleRoot-help.xml
Module Name: PSCredentialStore
online version:
schema: 2.0.0
---

View File

@ -7,6 +7,10 @@ function Test-CredentialStoreItem {
Use this cmdlet for basic checks with a single item. Check the item first with this function before
you try to interact with it.
Breaking Change for `v1.1.0+`:
Test-CredentialStoreItem will return `$false` even if the store doesn't exist. We removed the terminating
error and replaced it with a warning message.
.PARAMETER 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.
@ -88,10 +92,10 @@ function Test-CredentialStoreItem {
}
else {
$MsgParams = @{
ErrorAction = 'Stop'
Message = "The given credential store ({0}) does not exist!" -f $Path
Message = "The given credential store ({0}) does not exist!" -f $Path
}
Write-Error @MsgParams
Write-Warning @MsgParams
return $false
}
}