From 58b91b72128c9bf7fc1d2927121d39a00737167f Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 5 Mar 2018 08:43:06 +0100 Subject: [PATCH 1/9] skip coverage report for PRs --- tools/AppVeyor.psm1 | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/AppVeyor.psm1 b/tools/AppVeyor.psm1 index de78763..7cdebf0 100644 --- a/tools/AppVeyor.psm1 +++ b/tools/AppVeyor.psm1 @@ -153,13 +153,17 @@ Function Invoke-CoverageReport() { [ValidateNotNullOrEmpty()] [String]$RepoToken = $Env:CoverallsToken ) - - Import-Module ('.\src\{0}.psm1' -f $CALLSIGN) -Verbose -Force - $FileMap = New-PesterFileMap -SourceRoot '.\src' -PesterRoot '.\tests' - $CoverageReport = New-CoverageReport -PesterFileMap $FileMap -RepoToken $RepoToken - Write-Host "CoverageReport JSON:" -ForegroundColor Yellow - $CoverageReport | Out-String | Write-Host - Publish-CoverageReport -CoverageReport $CoverageReport + if ( $null -ne $RepoToken) { + Import-Module ('.\src\{0}.psm1' -f $CALLSIGN) -Verbose -Force + $FileMap = New-PesterFileMap -SourceRoot '.\src' -PesterRoot '.\tests' + $CoverageReport = New-CoverageReport -PesterFileMap $FileMap -RepoToken $RepoToken + Write-Host "CoverageReport JSON:" -ForegroundColor Yellow + $CoverageReport | Out-String | Write-Host + Publish-CoverageReport -CoverageReport $CoverageReport + } + else { + Write-Warning 'CoverallsToken var given but empty. This run is triggered by a PR. Skipping coverage report...' + } } Function Invoke-AppVeyorPSGallery() { From d45e42c2b1859d49ffe817cdef9b711c15aba39f Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 5 Mar 2018 08:52:51 +0100 Subject: [PATCH 2/9] Revert "skip coverage report for PRs" This reverts commit 58b91b72128c9bf7fc1d2927121d39a00737167f. --- tools/AppVeyor.psm1 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tools/AppVeyor.psm1 b/tools/AppVeyor.psm1 index 7cdebf0..de78763 100644 --- a/tools/AppVeyor.psm1 +++ b/tools/AppVeyor.psm1 @@ -153,17 +153,13 @@ Function Invoke-CoverageReport() { [ValidateNotNullOrEmpty()] [String]$RepoToken = $Env:CoverallsToken ) - if ( $null -ne $RepoToken) { - Import-Module ('.\src\{0}.psm1' -f $CALLSIGN) -Verbose -Force - $FileMap = New-PesterFileMap -SourceRoot '.\src' -PesterRoot '.\tests' - $CoverageReport = New-CoverageReport -PesterFileMap $FileMap -RepoToken $RepoToken - Write-Host "CoverageReport JSON:" -ForegroundColor Yellow - $CoverageReport | Out-String | Write-Host - Publish-CoverageReport -CoverageReport $CoverageReport - } - else { - Write-Warning 'CoverallsToken var given but empty. This run is triggered by a PR. Skipping coverage report...' - } + + Import-Module ('.\src\{0}.psm1' -f $CALLSIGN) -Verbose -Force + $FileMap = New-PesterFileMap -SourceRoot '.\src' -PesterRoot '.\tests' + $CoverageReport = New-CoverageReport -PesterFileMap $FileMap -RepoToken $RepoToken + Write-Host "CoverageReport JSON:" -ForegroundColor Yellow + $CoverageReport | Out-String | Write-Host + Publish-CoverageReport -CoverageReport $CoverageReport } Function Invoke-AppVeyorPSGallery() { From 8ed1f99e950258645ecdc486c81a6aa166a9142c Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 5 Mar 2018 09:00:53 +0100 Subject: [PATCH 3/9] skipp coverage report creation for PRs --- appveyor.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 19b96e0..1fa7b84 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,7 +33,13 @@ build_script: test_script: - ps: Invoke-AppVeyorTests - - ps: Invoke-CoverageReport + - ps: >- + if ($null -ne $Env:CoverallsToken) { + Invoke-CoverageReport + } + else { + Write-Warning "No CoverallsToken found. This build seems to be triggered by a PR. Skipping this step..." + } deploy: #- provider: GitHub From 99b3c85124c129769020da53e37f62cfe25d3a29 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 5 Mar 2018 09:04:22 +0100 Subject: [PATCH 4/9] fix YAML syntax --- appveyor.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1fa7b84..30511a4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,13 +33,13 @@ build_script: test_script: - ps: Invoke-AppVeyorTests - - ps: >- - if ($null -ne $Env:CoverallsToken) { - Invoke-CoverageReport - } - else { - Write-Warning "No CoverallsToken found. This build seems to be triggered by a PR. Skipping this step..." - } + - ps: | + if ($null -ne $Env:CoverallsToken) { + Invoke-CoverageReport + } + else { + Write-Warning "No CoverallsToken found. This build seems to be triggered by a PR. Skipping this step..." + } deploy: #- provider: GitHub From d938fa9f13e3b585802f494b17b802391a36272a Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 6 Mar 2018 14:36:43 +0100 Subject: [PATCH 5/9] adds WinScp dependency --- src/Dependency.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Dependency.json b/src/Dependency.json index 865f246..4d12c8a 100644 --- a/src/Dependency.json +++ b/src/Dependency.json @@ -32,6 +32,12 @@ "Modules": [ "VMware.VimAutomation.Cis.Core" ] + }, + { + "Name": "SCP", + "Modules": [ + "WinSCP" + ] } ] } From c35f6477768ad911f15cd469d9097b51529ed2d0 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 6 Mar 2018 14:36:59 +0100 Subject: [PATCH 6/9] adds scp connection type --- src/Connection/Connect-To.ps1 | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/Connection/Connect-To.ps1 b/src/Connection/Connect-To.ps1 index 5fb97b1..2e8c443 100644 --- a/src/Connection/Connect-To.ps1 +++ b/src/Connection/Connect-To.ps1 @@ -20,8 +20,9 @@ function Connect-To { - NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer. - VMware Establish a connection to a VMware vCenter or ESXi host. - CisServer Establish a connection to a Vmware CisServer. - - ExchangeHTTP Start a new remote session to the given Exchange server via unsecure http. + - ExchangeHTTP Start a new remote session to the given Exchange server via insecure http. - Exchange HTTPS Start a new remote session to the given exchange server with the secure https endpoint. + - SCP Establish a SCP connection. .PARAMETER Credentials Use this parameter to bypass the stored credentials. Without this parameter Connect-To tries to read the @@ -89,7 +90,16 @@ function Connect-To { [Parameter(Mandatory = $true, ParameterSetName = "Shared")] [Parameter(Mandatory = $true, ParameterSetName = "Private")] - [ValidateSet('CiscoUcs', 'FTP', 'NetAppFAS', 'VMware', 'CisServer', 'ExchangeHTTP', 'ExchangeHTTPS')] + [ValidateSet( + 'CiscoUcs', + 'FTP', + 'NetAppFAS', + 'VMware', + 'CisServer', + 'ExchangeHTTP', + 'ExchangeHTTPS', + 'SCP' + )] [string]$Type, [Parameter(Mandatory = $False, ParameterSetName = "Shared")] @@ -251,7 +261,6 @@ function Connect-To { ErrorAction = 'Stop' } $Global:PSExchangeRemote = New-PSSession @ConnectionParams - $Global:PSExchangeRemote } catch { # Write a error message to the log. @@ -271,7 +280,6 @@ function Connect-To { ErrorAction = 'Stop' } $Global:PSExchangeRemote = New-PSSession @ConnectionParams - $Global:PSExchangeRemote } catch { # Write a error message to the log. @@ -282,6 +290,36 @@ function Connect-To { Write-Error @MessageParams } } + "SCP" { + $WinSCPSessionParams = @{ + Credential = $creds + Hostname = $RemoteHost + Protocol = 'Scp' + GiveUpSecurityAndAcceptAnySshHostKey = $True + } + try { + $SessionOption = New-WinSCPSessionOption @WinSCPSessionParams + $Global:WinSCPSession = New-WinSCPSession -SessionOption $SessionOption + Write-Verbose -Message ("SCP Connection established with {0}" -f $Global:WinSCPSession.Hostname) + } + catch { + # Write a error message to the log. + $MessageParams = @{ + Message = "Unable to connect to {0} using Type {1}." -f $RemoteHost, $Type + ErrorAction = "Stop" + } + Write-Error @MessageParams + } + # Check the Connection State + if (!($WinSCPSession.Opened)) { + # Check the connection state and find out if the session is still open. + $MessageParams = @{ + Message = "Connection to {0} using Type {1} was established. But now it seems to be lost!" -f $RemoteHost, $Type + ErrorAction = "Stop" + } + Write-Error @MessageParams + } + } default { # Write a error message to the log. $MessageParams = @{ From 98a50d76302741a74fb9d4ec159f107b5b4f4d79 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 6 Mar 2018 14:40:06 +0100 Subject: [PATCH 7/9] adds scp disconnect --- src/Connection/Disconnect-From.ps1 | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Connection/Disconnect-From.ps1 b/src/Connection/Disconnect-From.ps1 index abc864b..3da3fe4 100644 --- a/src/Connection/Disconnect-From.ps1 +++ b/src/Connection/Disconnect-From.ps1 @@ -22,6 +22,8 @@ function Disconnect-From { - CisServer Terminates the connection from a Vmware CisServer. - ExchangeHTTP Remove the existing remote session to the given Exchange server - ExchangeHTTPS Remove the existing remote session to the given Exchange server + - SCP Terminates the existing SCP session. + .PARAMETER Force Force the disconnect, even if the disconnect would fail. @@ -70,7 +72,16 @@ function Disconnect-From { [string]$RemoteHost, [Parameter(Mandatory = $true)] - [ValidateSet('CiscoUcs', 'FTP', 'NetAppFAS', 'VMware', 'CisServer', 'ExchangeHTTP', 'ExchangeHTTPS')] + [ValidateSet( + 'CiscoUcs', + 'FTP', + 'NetAppFAS', + 'VMware', + 'CisServer', + 'ExchangeHTTP', + 'ExchangeHTTPS', + 'SCP' + )] [string]$Type, [Parameter(Mandatory = $false)] @@ -178,6 +189,18 @@ function Disconnect-From { Write-Error @MessageParams } } + "SCP" { + if ($Global:WinSCPSession.Opened) { + Remove-WinSCPSession -WinSCPSession $Global:WinSCPSession + } + else { + $MessageParams = @{ + Message = "There is no open WinSCP Session" + ErrorAction = "Stop" + } + Write-Error @MessageParams + } + } default { # Write a error message to the log. $MessageParams = @{ From 0235aa5c917d77cd31daa09c3fbf385a6ef519a0 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 6 Mar 2018 14:42:01 +0100 Subject: [PATCH 8/9] bump version --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 30511a4..400c196 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.2.0.{build} +version: 0.2.1.{build} branches: only: From b6cfa5e580cffe55314c699ccd4af5ae2d2b3839 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 6 Mar 2018 15:08:08 +0100 Subject: [PATCH 9/9] update docs --- docs/Connect-To.md | 39 +++++++++----- docs/Disconnect-From.md | 33 ++++++++---- docs/Get-CredentialStore.md | 6 +-- docs/Get-CredentialStoreItem.md | 10 ++-- docs/New-CredentialStore.md | 10 ++-- docs/New-CredentialStoreItem.md | 12 ++--- docs/PSCredentialStore.md | 5 +- docs/Remove-CredentialStoreItem.md | 10 ++-- docs/Set-CredentialStoreItem.md | 10 ++-- docs/Test-CSConnection.md | 82 ++++++++++++++++++++++++++++++ docs/Test-CredentialStore.md | 6 +-- docs/Test-CredentialStoreItem.md | 10 ++-- 12 files changed, 170 insertions(+), 63 deletions(-) create mode 100644 docs/Test-CSConnection.md diff --git a/docs/Connect-To.md b/docs/Connect-To.md index 01277b5..8e80352 100644 --- a/docs/Connect-To.md +++ b/docs/Connect-To.md @@ -29,32 +29,42 @@ Establish a connection to the selected host using a stored CredentialStoreItem. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs ``` -### -------------------------- EXAMPLE 2 -------------------------- +### EXAMPLE 2 ``` Connect-To -RemoteHost "ftp.myside.local" -Type FTP ``` -### -------------------------- EXAMPLE 3 -------------------------- +### EXAMPLE 3 ``` Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS ``` -### -------------------------- EXAMPLE 4 -------------------------- +### EXAMPLE 4 ``` Connect-To -RemoteHost "esx01.myside.local" -Type VMware ``` -### -------------------------- EXAMPLE 5 -------------------------- +### EXAMPLE 5 ``` Connect-To -RemoteHost "vCenter.myside.local" -Type CisServer ``` -### -------------------------- EXAMPLE 6 -------------------------- +### EXAMPLE 6 +``` +Connect-To -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP +``` + +### EXAMPLE 7 +``` +Connect-To -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS +``` + +### EXAMPLE 8 ``` $MyCreds = Get-Credential ``` @@ -71,7 +81,7 @@ Specify the host, for which you would like to change the credentials. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -88,7 +98,7 @@ same hostname. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -105,11 +115,14 @@ Currently implemented targets are: - NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer. - VMware Establish a connection to a VMware vCenter or ESXi host. - CisServer Establish a connection to a Vmware CisServer. + - ExchangeHTTP Start a new remote session to the given Exchange server via insecure http. + - Exchange HTTPS Start a new remote session to the given exchange server with the secure https endpoint. + - SCP Establish a SCP connection. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -128,7 +141,7 @@ So you can use it to enable credentials without preparing any user interaction. ```yaml Type: PSCredential Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -143,7 +156,7 @@ Define a custom path to a shared CredentialStore. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -160,7 +173,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -181,11 +194,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### [None] ## NOTES -\`\`\` File Name : Connect-To.ps1 Author : Marco Blessing - marco.blessing@googlemail.com Requires : -\`\`\` ## RELATED LINKS diff --git a/docs/Disconnect-From.md b/docs/Disconnect-From.md index dda7e88..bcafe08 100644 --- a/docs/Disconnect-From.md +++ b/docs/Disconnect-From.md @@ -21,36 +21,46 @@ Terminates a session established with Connect-To using a CredentialStoreItem. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` Disconnect-From -RemoteHost "ucs.myside.local" -Type CiscoUcs ``` -### -------------------------- EXAMPLE 2 -------------------------- +### EXAMPLE 2 ``` Disconnect-From -RemoteHost "ftp.myside.local" -Type FTP ``` -### -------------------------- EXAMPLE 3 -------------------------- +### EXAMPLE 3 ``` Disconnect-From -RemoteHost "fas.myside.local" -Type NetAppFAS ``` -### -------------------------- EXAMPLE 4 -------------------------- +### EXAMPLE 4 ``` Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware ``` -### -------------------------- EXAMPLE 5 -------------------------- +### EXAMPLE 5 ``` Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True ``` -### -------------------------- EXAMPLE 6 -------------------------- +### EXAMPLE 6 ``` Disconnect-From -RemoteHost "vcenter.myside.local" -Type CisServer ``` +### EXAMPLE 7 +``` +Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP +``` + +### EXAMPLE 8 +``` +Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS +``` + ## PARAMETERS ### -RemoteHost @@ -59,7 +69,7 @@ Specify the remote endpoint, whose session you would like to terminate. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 1 @@ -76,11 +86,14 @@ Currently implemented targets are: - NetAppFAS Terminates the connection from a NetApp Clustered ONTAP filer. - VMware Terminates the connection from a VMware vCenter or ESXi host. - CisServer Terminates the connection from a Vmware CisServer. + - ExchangeHTTP Remove the existing remote session to the given Exchange server + - ExchangeHTTPS Remove the existing remote session to the given Exchange server + - SCP Terminates the existing SCP session. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 2 @@ -95,7 +108,7 @@ Force the disconnect, even if the disconnect would fail. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -116,11 +129,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### [None] ## NOTES -\`\`\` File Name : Disconnect-From.ps1 Author : Marco Blessing - marco.blessing@googlemail.com Requires : -\`\`\` ## RELATED LINKS diff --git a/docs/Get-CredentialStore.md b/docs/Get-CredentialStore.md index dc32b47..4a9b63c 100644 --- a/docs/Get-CredentialStore.md +++ b/docs/Get-CredentialStore.md @@ -31,7 +31,7 @@ Get-CredentialStoreItem. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` $CSContent = Get-CredentialStore -Path "C:\TMP\mystore.json" ``` @@ -44,7 +44,7 @@ Define a custom path to a shared CredentialStore. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -61,7 +61,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named diff --git a/docs/Get-CredentialStoreItem.md b/docs/Get-CredentialStoreItem.md index bd1c5cf..0962eb5 100644 --- a/docs/Get-CredentialStoreItem.md +++ b/docs/Get-CredentialStoreItem.md @@ -28,7 +28,7 @@ Return the credential as PSCredential object. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` $myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" ``` @@ -41,7 +41,7 @@ Define a custom path to a shared CredentialStore. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -56,7 +56,7 @@ Specify the host, for which you would like to change the credentials. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -74,7 +74,7 @@ For example ad/sys1, ftp/sys1, mssql/sys1 ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -91,7 +91,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named diff --git a/docs/New-CredentialStore.md b/docs/New-CredentialStore.md index bd1c5cf..0962eb5 100644 --- a/docs/New-CredentialStore.md +++ b/docs/New-CredentialStore.md @@ -28,7 +28,7 @@ Return the credential as PSCredential object. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` $myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" ``` @@ -41,7 +41,7 @@ Define a custom path to a shared CredentialStore. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -56,7 +56,7 @@ Specify the host, for which you would like to change the credentials. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -74,7 +74,7 @@ For example ad/sys1, ftp/sys1, mssql/sys1 ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -91,7 +91,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named diff --git a/docs/New-CredentialStoreItem.md b/docs/New-CredentialStoreItem.md index eb5a7ff..1c373ea 100644 --- a/docs/New-CredentialStoreItem.md +++ b/docs/New-CredentialStoreItem.md @@ -33,7 +33,7 @@ a VIConnection, NetApp FAS or UCS Fabric Interconnect. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` New-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" ``` @@ -46,7 +46,7 @@ Define the store in which you would like to add a new item. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -61,7 +61,7 @@ The identifier or rather name for the given credentials. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -79,7 +79,7 @@ For example ad/sys1, ftp/sys1, mssql/sys1 ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -94,7 +94,7 @@ You can provide credentials optionally as pre existing pscredential object. ```yaml Type: PSCredential Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -109,7 +109,7 @@ Accept wildcard characters: False ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named diff --git a/docs/PSCredentialStore.md b/docs/PSCredentialStore.md index 69f3f3b..6b840c0 100644 --- a/docs/PSCredentialStore.md +++ b/docs/PSCredentialStore.md @@ -8,7 +8,7 @@ Locale: en-US # PSCredentialStore Module ## Description -PSCredentialStore enables managing multiple PSCredential objects. +{{Manually Enter Description Here}} ## PSCredentialStore Cmdlets ### [Connect-To](Connect-To.md) @@ -41,3 +41,6 @@ Returns the credential store state. ### [Test-CredentialStoreItem](Test-CredentialStoreItem.md) Checks if the given RemoteHost identifier combination exists in the credential store. +### [Test-CSConnection](Test-CSConnection.md) +Returns the connection state of a given type to the remote host. + diff --git a/docs/Remove-CredentialStoreItem.md b/docs/Remove-CredentialStoreItem.md index 7f0f540..ee5757d 100644 --- a/docs/Remove-CredentialStoreItem.md +++ b/docs/Remove-CredentialStoreItem.md @@ -28,7 +28,7 @@ Use this CMDLet to completely remove an credential store item. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" ``` @@ -43,7 +43,7 @@ Define the store in which your given host entry already exists. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -58,7 +58,7 @@ Specify the host you for which you would like to change the credentials. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -75,7 +75,7 @@ same hostname. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -92,7 +92,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named diff --git a/docs/Set-CredentialStoreItem.md b/docs/Set-CredentialStoreItem.md index 9f15422..34f119a 100644 --- a/docs/Set-CredentialStoreItem.md +++ b/docs/Set-CredentialStoreItem.md @@ -28,7 +28,7 @@ Set-CredentialStoreItem [-Path ] -RemoteHost [-Identifier [-Type] [] +``` + +## DESCRIPTION +Use this script to check a connection which was established with the \`Connect-To\` cmdlet. + +## EXAMPLES + +### EXAMPLE 1 +``` +.\Test-CMConnection -RemoteHost "r0-i01-vcr01.p0r.kivbf-cloud.net" -Type VMware +``` + +## PARAMETERS + +### -RemoteHost +Define the remote host you would like to check. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +Define the connection type you would like to check. +See the \`Connect-To\` documentation +for valid type values. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +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). + +## INPUTS + +### [None] + +## OUTPUTS + +### [Boolean] + +## NOTES +File Name : Test-CSConnection.ps1 +Author : Marco Blessing - marco.blessing@googlemail.com +Requires : + +## RELATED LINKS + +[https://github.com/OCram85/PSCredentialStore](https://github.com/OCram85/PSCredentialStore) + diff --git a/docs/Test-CredentialStore.md b/docs/Test-CredentialStore.md index de4f824..465d450 100644 --- a/docs/Test-CredentialStore.md +++ b/docs/Test-CredentialStore.md @@ -30,7 +30,7 @@ the file exists. ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> {{ Add example code here }} ``` @@ -44,7 +44,7 @@ Define a custom path to a shared CredentialStore. ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -61,7 +61,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named diff --git a/docs/Test-CredentialStoreItem.md b/docs/Test-CredentialStoreItem.md index bccadf3..e5f5126 100644 --- a/docs/Test-CredentialStoreItem.md +++ b/docs/Test-CredentialStoreItem.md @@ -30,7 +30,7 @@ you try to interact with it. ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### EXAMPLE 1 ``` If (Test-CredentialStoreItem -RemoteHost "Default") { ``` @@ -51,7 +51,7 @@ Without the \`-Path\` parameter ```yaml Type: String Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named @@ -66,7 +66,7 @@ Specify the host, for which you would like to change the credentials. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: Named @@ -83,7 +83,7 @@ for a single host. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -100,7 +100,7 @@ can be decrypted across systems. ```yaml Type: SwitchParameter Parameter Sets: Shared -Aliases: +Aliases: Required: False Position: Named