PSCredentialStore/docs/New-CredentialStore.md

207 lines
4.4 KiB
Markdown
Raw Normal View History

2019-04-08 15:25:08 +02:00
# New-CredentialStore
2019-04-08 13:12:15 +02:00
## SYNOPSIS
2019-04-08 15:25:08 +02:00
Creates a new credential store File
2019-04-08 13:12:15 +02:00
## SYNTAX
2019-04-08 15:25:08 +02:00
### Private (Default)
```
New-CredentialStore [-Force] [-PassThru] [-SkipPFXCertCreation] [-UseCertStore] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
### Shared
2019-04-08 13:12:15 +02:00
```
2019-04-08 15:25:08 +02:00
New-CredentialStore [-Shared] [-Path <FileInfo>] [-Force] [-PassThru] [-SkipPFXCertCreation] [-UseCertStore]
[-WhatIf] [-Confirm] [<CommonParameters>]
2019-04-08 13:12:15 +02:00
```
## DESCRIPTION
2019-04-08 15:25:08 +02:00
You need to run this script first to create a new credential store before you try to
save new credentials with New-CredentialStoreItem.
2019-04-08 13:12:15 +02:00
## EXAMPLES
### BEISPIEL 1
```
2019-04-08 15:25:08 +02:00
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"
2019-04-08 13:12:15 +02:00
```
2019-04-08 15:25:08 +02:00
# Creates a new shared CredentialStore in the given location.
2019-04-08 13:12:15 +02:00
## PARAMETERS
2019-04-08 15:25:08 +02:00
### -Force
Use this switch to reset an existing store.
The complete content will be wiped.
2019-04-08 13:12:15 +02:00
```yaml
2019-04-08 15:25:08 +02:00
Type: SwitchParameter
2019-04-08 13:12:15 +02:00
Parameter Sets: (All)
Aliases:
2019-04-08 15:25:08 +02:00
Required: False
Position: Named
Default value: False
2019-04-08 13:12:15 +02:00
Accept pipeline input: False
Accept wildcard characters: False
```
2019-04-08 15:25:08 +02:00
### -PassThru
{{ Fill PassThru Description }}
2019-04-08 13:12:15 +02:00
```yaml
2019-04-08 15:25:08 +02:00
Type: SwitchParameter
2019-04-08 13:12:15 +02:00
Parameter Sets: (All)
Aliases:
Required: False
2019-04-08 15:25:08 +02:00
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Path
Define a location for the new shared CredentialStore.
The default store will be created in
$Env:ProgramData\PSCredentialStore dir.
```yaml
Type: FileInfo
Parameter Sets: Shared
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Shared
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
Parameter Sets: Shared
Aliases:
Required: True
Position: Named
Default value: False
2019-04-08 13:12:15 +02:00
Accept pipeline input: False
Accept wildcard characters: False
```
2019-04-08 15:25:08 +02:00
### -SkipPFXCertCreation
2019-04-29 11:38:56 +02:00
You can skip the pfx certification process.
This makes sense if you have a previously created cert or want to
import a cert in cross-platform environments.
2019-04-08 13:12:15 +02:00
```yaml
2019-04-08 15:25:08 +02:00
Type: SwitchParameter
2019-04-08 13:12:15 +02:00
Parameter Sets: (All)
Aliases:
Required: False
2019-04-08 15:25:08 +02:00
Position: Named
Default value: False
2019-04-08 13:12:15 +02:00
Accept pipeline input: False
Accept wildcard characters: False
```
2019-04-08 15:25:08 +02:00
### -UseCertStore
2019-04-29 11:38:56 +02:00
Instead of using a plain pfx file beside your CredentialStore file you can import it into the user or machine
certification 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.
2019-04-08 13:12:15 +02:00
```yaml
2019-04-08 15:25:08 +02:00
Type: SwitchParameter
2019-04-08 13:12:15 +02:00
Parameter Sets: (All)
Aliases:
Required: False
2019-04-08 15:25:08 +02:00
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
2019-04-08 13:12:15 +02:00
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
2019-04-29 11:38:56 +02:00
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).
2019-04-08 13:12:15 +02:00
## INPUTS
### [None]
## OUTPUTS
2019-04-08 15:25:08 +02:00
### ['PSCredentialStore.Store'] Returns the recently created CredentialStore object if the -PassThru parameter
### was given.
2019-04-08 13:12:15 +02:00
## NOTES
2019-04-08 15:25:08 +02:00
- File Name : New-CredentialStore.ps1
- Author : Marco Blessing - marco.blessing@googlemail.com
- Requires :
2019-04-08 13:12:15 +02:00
## RELATED LINKS
[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore)