update pwsh style in private files
This commit is contained in:
parent
8cab0aeac6
commit
9f7cac860e
@ -23,15 +23,8 @@ function Get-CSPfxCertificate {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Get-CSPfxCertificate -Thumbprint '12345678' -StoreName 'My' -StoreLocation 'CurrentUser'
|
Get-CSPfxCertificate -Thumbprint '12345678' -StoreName 'My' -StoreLocation 'CurrentUser'
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : Get-CSPfxCertificate.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType([System.Security.Cryptography.X509Certificates.X509Certificate2])]
|
[OutputType([System.Security.Cryptography.X509Certificates.X509Certificate2])]
|
||||||
param (
|
param (
|
||||||
|
@ -14,15 +14,8 @@ function Get-DefaultCredentialStorePath {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
$Path = Get-DefaultCredentialStorePath
|
$Path = Get-DefaultCredentialStorePath
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : Get-DefaultCredentialStorePath.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType([string])]
|
[OutputType([string])]
|
||||||
param (
|
param (
|
||||||
|
@ -6,20 +6,11 @@ function Get-ModuleBase {
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This is just a wrapper for enabling pester tests.
|
This is just a wrapper for enabling pester tests.
|
||||||
|
|
||||||
|
|
||||||
.OUTPUTS
|
.OUTPUTS
|
||||||
Returns the base path as string
|
Returns the base path as string
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : Get-ModuleBase.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType()]
|
[OutputType([string])]
|
||||||
param ()
|
param ()
|
||||||
begin {}
|
begin {}
|
||||||
process {
|
process {
|
||||||
|
@ -14,14 +14,6 @@ function Get-RandomAESKey {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
.\Get-RandomAESKey
|
.\Get-RandomAESKey
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : Get-RandomAESKey.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
|
@ -13,21 +13,13 @@ function Get-TempDir {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Get-TempDir
|
Get-TempDir
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : Get-TempDir.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType([string])]
|
[OutputType([string])]
|
||||||
param ()
|
param ()
|
||||||
begin {
|
|
||||||
|
|
||||||
}
|
begin {}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
return (Resolve-Path -Path '/tmp/').Path
|
return (Resolve-Path -Path '/tmp/').Path
|
||||||
|
@ -22,17 +22,9 @@ function Import-CSPfxCertificate {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Import-CSPfxCertificate -Path (Join-Path -Path $Env:APPDATA -ChildPath '/PSCredentialStore.pfx')
|
Import-CSPfxCertificate -Path (Join-Path -Path $Env:APPDATA -ChildPath '/PSCredentialStore.pfx')
|
||||||
|
|
||||||
.NOTES
|
|
||||||
File Name : Import-CSPfxCertificate.ps1
|
|
||||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType()]
|
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
@ -68,6 +60,7 @@ function Import-CSPfxCertificate {
|
|||||||
)]
|
)]
|
||||||
[string]$OpenFlags = 'ReadWrite'
|
[string]$OpenFlags = 'ReadWrite'
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
$Store = [System.Security.Cryptography.X509Certificates.X509Store]::new($StoreName, $StoreLocation)
|
$Store = [System.Security.Cryptography.X509Certificates.X509Store]::new($StoreName, $StoreLocation)
|
||||||
try {
|
try {
|
||||||
@ -77,6 +70,7 @@ function Import-CSPfxCertificate {
|
|||||||
$_.Exception.Message | Write-Error -ErrorAction Stop
|
$_.Exception.Message | Write-Error -ErrorAction Stop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
try {
|
try {
|
||||||
$cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new(
|
$cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new(
|
||||||
|
@ -38,16 +38,9 @@ function Resolve-Dependency {
|
|||||||
If (-not (Resolve-Dependency -Name 'VMware')) {
|
If (-not (Resolve-Dependency -Name 'VMware')) {
|
||||||
Write-Error -Message ("Could not resolve the optional dependencies defined for {0}" -f 'VMware') -ErrorAction 'Stop'
|
Write-Error -Message ("Could not resolve the optional dependencies defined for {0}" -f 'VMware') -ErrorAction 'Stop'
|
||||||
}
|
}
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : ResolveDependency.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
[OutputType([bool])]
|
|
||||||
|
[OutputType([boolean])]
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
@ -86,6 +79,5 @@ function Resolve-Dependency {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end {
|
end {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -23,17 +23,10 @@ function Test-CSPfxCertificate {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Test-CSPfxCertificate -Thumbprint '12345678' -StoreName 'My' -StoreLocation 'CurrentUser'
|
Test-CSPfxCertificate -Thumbprint '12345678' -StoreName 'My' -StoreLocation 'CurrentUser'
|
||||||
|
|
||||||
.NOTES
|
|
||||||
File Name : Test-CSPfxCertificate.ps1
|
|
||||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType([bool])]
|
[OutputType([boolean])]
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
|
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
|
@ -32,14 +32,6 @@ function Test-Module {
|
|||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
.\Test-Dependency -Name 'VMware.PowerCLI' -Type 'Module' -StopIfFails
|
.\Test-Dependency -Name 'VMware.PowerCLI' -Type 'Module' -StopIfFails
|
||||||
|
|
||||||
.NOTES
|
|
||||||
- File Name : Test-Module.ps1
|
|
||||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
|
||||||
- Requires :
|
|
||||||
|
|
||||||
.LINK
|
|
||||||
https://github.com/OCram85/PSCredentialStore
|
|
||||||
#>
|
#>
|
||||||
[OutputType([bool])]
|
[OutputType([bool])]
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
@ -56,6 +48,7 @@ Could not find the required {0} called {1}. Please install the required {0} to r
|
|||||||
[Parameter(Mandatory = $false)]
|
[Parameter(Mandatory = $false)]
|
||||||
[switch]$StopIfFails
|
[switch]$StopIfFails
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {}
|
begin {}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
|
Loading…
Reference in New Issue
Block a user