update pwsh style
This commit is contained in:
parent
3aa126d64c
commit
cdd58bc167
@ -21,14 +21,6 @@ function Test-CSConnection {
|
||||
|
||||
.EXAMPLE
|
||||
Test-CMConnection -RemoteHost "vcr01.internal.net" -Type VMware
|
||||
|
||||
.NOTES
|
||||
- File Name : Test-CSConnection.ps1
|
||||
- Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
- Requires :
|
||||
|
||||
.LINK
|
||||
https://github.com/OCram85/PSCredentialStore
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
@ -38,7 +30,7 @@ function Test-CSConnection {
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$RemoteHost,
|
||||
|
||||
[Parameter(Mandatory = $True)]
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ValidateSet("CiscoUcs", "FTP", "NetAppFAS", "VMware")]
|
||||
[string]$Type
|
||||
|
@ -29,13 +29,14 @@ function Test-CredentialStoreItem {
|
||||
[None]
|
||||
|
||||
.EXAMPLE
|
||||
If (Test-CredentialStoreItem -RemoteHost "Default") {
|
||||
if (Test-CredentialStoreItem -RemoteHost "Default") {
|
||||
Get-CredentialStoreItem -RemoteHost "Default"
|
||||
}
|
||||
Else {
|
||||
else {
|
||||
Write-Warning ("The given Remote Host {0} does not exist in the credential Store!" -f $RemoteHost)
|
||||
}
|
||||
#>
|
||||
|
||||
[CmdletBinding(DefaultParameterSetName = 'Private')]
|
||||
[OutputType([bool])]
|
||||
param (
|
||||
|
@ -9,6 +9,7 @@ function Get-ModuleBase {
|
||||
.OUTPUTS
|
||||
Returns the base path as string
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
[OutputType([string])]
|
||||
param ()
|
||||
|
@ -14,6 +14,7 @@ function Get-TempDir {
|
||||
.EXAMPLE
|
||||
Get-TempDir
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
[OutputType([string])]
|
||||
param ()
|
||||
@ -27,10 +28,14 @@ function Get-TempDir {
|
||||
if ($IsMacOS) {
|
||||
return (Resolve-Path -Path '/tmp/').Path
|
||||
}
|
||||
elseif (($isWindows) -or ($PSVersionTable.PSVersion.Major -lt 6) -or ($PSVersionTable.PSEdition -eq 'Desktop')) {
|
||||
elseif (
|
||||
($isWindows) -or
|
||||
($PSVersionTable.PSVersion.Major -lt 6) -or
|
||||
($PSVersionTable.PSEdition -eq 'Desktop')
|
||||
) {
|
||||
return (Resolve-Path -Path $env:TEMP).Path
|
||||
}
|
||||
}
|
||||
end {
|
||||
}
|
||||
|
||||
end {}
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ function Test-Module {
|
||||
.EXAMPLE
|
||||
.\Test-Dependency -Name 'VMware.PowerCLI' -Type 'Module' -StopIfFails
|
||||
#>
|
||||
|
||||
[OutputType([bool])]
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
|
@ -242,6 +242,5 @@ function New-CredentialStore {
|
||||
}
|
||||
}
|
||||
|
||||
end {
|
||||
}
|
||||
end {}
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ function Test-CredentialStore {
|
||||
|
||||
.EXAMPLE
|
||||
Test-CredentialStore -eq $true
|
||||
|
||||
#>
|
||||
|
||||
[CmdletBinding(DefaultParameterSetName = 'Private')]
|
||||
[OutputType([bool])]
|
||||
param (
|
||||
|
Loading…
Reference in New Issue
Block a user