Implements CisServer connection handling (#10)

### fixes #8 

- gh deployment for dev branch removed
  - duplicate deployment.
  - see appveyor artifacts.
- installation of dependencies moved to ps function
- modularize PSGallery Deployment branch
- update platPS docs
- enable private build
- Implements ConnectionType CisServer (#9)
This commit is contained in:
OCram85 2017-10-23 10:53:52 +02:00 committed by GitHub
parent 855cb920c8
commit 599232ecec
29 changed files with 200 additions and 47 deletions

View File

@ -73,6 +73,8 @@ If you have already installed the underlying framework / modules, you can connec
* Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926) * Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926)
* **VMware** - Establish a connection to a VMware vCenter or ESXi host. * **VMware** - Establish a connection to a VMware vCenter or ESXi host.
* Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI) * Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI)
* **CisServer** - Establish a connection to the CisServer Service on vCenter Host.
* Required Modules: [`VMware.VimAutomation.Cis.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI)
Here are some basic examples: Here are some basic examples:
@ -81,4 +83,5 @@ Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
Connect-To -RemoteHost "ftp.myside.local" -Type FTP Connect-To -RemoteHost "ftp.myside.local" -Type FTP
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
Connect-To -RemoteHost "esx01.myside.local" -Type VMware Connect-To -RemoteHost "esx01.myside.local" -Type VMware
Connect-To -RemoteHost "vcr.myside.local" -Type CisServer
``` ```

View File

@ -14,15 +14,8 @@ image: Visual Studio 2017
# Install pester module and init the Appveyor support. # Install pester module and init the Appveyor support.
install: install:
- ps: Install-PackageProvider -Name NuGet -MinimumVersion '2.8.5.201' -Force -Verbose
- ps: Import-PackageProvider NuGet -MinimumVersion '2.8.5.201' -Force
- ps: Install-Module -Name 'Pester' -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber
- ps: Update-Module 'Pester'
- ps: Install-Module -Name 'posh-git' -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber
- ps: Update-Module 'posh-git'
- ps: Install-Module -Name 'PSCoverage' -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber
- ps: Import-Module 'PSCoverage'
- ps: Import-Module .\tools\AppVeyor.psm1 - ps: Import-Module .\tools\AppVeyor.psm1
- ps: Invoke-InstallDependencies -Verbose
environment: environment:
NuGetToken: NuGetToken:
@ -42,15 +35,23 @@ test_script:
- ps: Invoke-AppVeyorTests - ps: Invoke-AppVeyorTests
- ps: Invoke-CoverageReport - ps: Invoke-CoverageReport
#deploy: deploy:
# - provider: GitHub #- provider: GitHub
# auth_token: # auth_token:
# secure: M+bBX5/nKdJB0eViP7xtrLVTwf3vGDUA9N2MMprZp2i+9ZR3CBVcJnSzJWUmalhB # secure: M+bBX5/nKdJB0eViP7xtrLVTwf3vGDUA9N2MMprZp2i+9ZR3CBVcJnSzJWUmalhB
# artifact: PSCredentialStore.zip # upload all NuGet packages to release assets # artifact: PSCredentialStore.zip # upload all NuGet packages to release assets
# draft: false # draft: true
# prerelease: true # prerelease: true
# on: # on:
# branch: master # release from master branch only # branch: dev
# - provider: GitHub
#after_deploy: auth_token:
# - ps: Invoke-AppVeyorPSGallery secure: M+bBX5/nKdJB0eViP7xtrLVTwf3vGDUA9N2MMprZp2i+9ZR3CBVcJnSzJWUmalhB
artifact: PSCredentialStore.zip # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only
after_deploy:
- ps: Invoke-AppVeyorPSGallery -OnBranch 'master'

View File

@ -34,12 +34,28 @@ Establish a connection to the selected host using a stored CredentialStoreItem.
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
``` ```
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
### -------------------------- EXAMPLE 2 -------------------------- ### -------------------------- EXAMPLE 2 --------------------------
``` ```
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
```
### -------------------------- EXAMPLE 3 --------------------------
```
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
```
### -------------------------- EXAMPLE 4 --------------------------
```
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
```
### -------------------------- EXAMPLE 5 --------------------------
```
Connect-To -RemoteHost "vCenter.myside.local" -Type CisServer
```
### -------------------------- EXAMPLE 6 --------------------------
```
$MyCreds = Get-Credential $MyCreds = Get-Credential
``` ```
@ -88,6 +104,7 @@ Currently implemented targets are:
- FTP Establish a connection to a FTP host. - FTP Establish a connection to a FTP host.
- NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer. - NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer.
- VMware Establish a connection to a VMware vCenter or ESXi host. - VMware Establish a connection to a VMware vCenter or ESXi host.
- CisServer Establish a connection to a Vmware CisServer.
```yaml ```yaml
Type: String Type: String
@ -164,9 +181,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [None] ### [None]
## NOTES ## NOTES
\`\`\`
File Name : Connect-To.ps1 File Name : Connect-To.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : PSFTP, PowerCLI Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -46,6 +46,11 @@ Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True
``` ```
### -------------------------- EXAMPLE 6 --------------------------
```
Disconnect-From -RemoteHost "vcenter.myside.local" -Type CisServer
```
## PARAMETERS ## PARAMETERS
### -RemoteHost ### -RemoteHost
@ -66,10 +71,11 @@ Accept wildcard characters: False
### -Type ### -Type
Specify the host type of the target. Specify the host type of the target.
Currently implemented targets are: Currently implemented targets are:
- CiscoUcs Establish a connection to a Cisco UCS Fabric Interconnect. - CiscoUcs Terminates the connection from a Cisco UCS Fabric Interconnect.
- FTP Establish a connection to a FTP host. - FTP Terminates the connection from a FTP host.
- NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer. - NetAppFAS Terminates the connection from a NetApp Clustered ONTAP filer.
- VMware Establish a connection to a VMware vCenter or ESXi host. - VMware Terminates the connection from a VMware vCenter or ESXi host.
- CisServer Terminates the connection from a Vmware CisServer.
```yaml ```yaml
Type: String Type: String
@ -110,9 +116,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [None] ### [None]
## NOTES ## NOTES
File Name : Disconnect-To.ps1 \`\`\`
File Name : Disconnect-From.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -82,9 +82,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [PSObject] Returns the credential store content as PSObject. ### [PSObject] Returns the credential store content as PSObject.
## NOTES ## NOTES
\`\`\`
File Name : Get-CredentialStore.ps1 File Name : Get-CredentialStore.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -112,9 +112,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [System.Management.Automation.PSCredential] ### [System.Management.Automation.PSCredential]
## NOTES ## NOTES
\`\`\`
File Name : Get-CredentialStoreItem.ps1 File Name : Get-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -112,9 +112,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [System.Management.Automation.PSCredential] ### [System.Management.Automation.PSCredential]
## NOTES ## NOTES
\`\`\`
File Name : Get-CredentialStoreItem.ps1 File Name : Get-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -130,9 +130,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [None] ### [None]
## NOTES ## NOTES
\`\`\`
File Name : New-CredentialStoreItem.ps1 File Name : New-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -113,9 +113,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [None] ### [None]
## NOTES ## NOTES
\`\`\`
File Name : Remove-CredentialStoreItem.ps1 File Name : Remove-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -113,9 +113,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [None] ### [None]
## NOTES ## NOTES
\`\`\`
File Name : Set-CredentialStoreItem.ps1 File Name : Set-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -78,9 +78,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS ## OUTPUTS
## NOTES ## NOTES
\`\`\`
File Name : Test-CredentialStore.ps1 File Name : Test-CredentialStore.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -121,9 +121,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### [None] ### [None]
## NOTES ## NOTES
\`\`\`
File Name : Test-CredentialStoreItem.ps1 File Name : Test-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
\`\`\`
## RELATED LINKS ## RELATED LINKS

View File

@ -70,15 +70,18 @@ If you have already installed the underlying framework your can connect to:
* Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926) * Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926)
* **VMware** - Establish a connection to a VMware vCenter or ESXi host. * **VMware** - Establish a connection to a VMware vCenter or ESXi host.
* Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI) * Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI)
* **CisServer** - Establish a connection to the CisServer Service on vCenter Host.
* Required Modules: [`VMware.VimAutomation.Cis.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI))
# EXAMPLES # EXAMPLES
```powershell ```powershell
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
Connect-To -RemoteHost "ftp.myside.local" -Type FTP Connect-To -RemoteHost "ftp.myside.local" -Type FTP
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
Connect-To -RemoteHost "esx01.myside.local" -Type VMware Connect-To -RemoteHost "esx01.myside.local" -Type VMware
Connect-To -RemoteHost "vcr.myside.local" -Type CisServer
``` ```
# NOTE # NOTE

View File

@ -19,10 +19,11 @@ function Get-ChallengeFile {
.\Get-RandomKey -Path "C:\TMP\Challenge.bin" .\Get-RandomKey -Path "C:\TMP\Challenge.bin"
.NOTES .NOTES
```
File Name : Get-ChallengeFile.ps1 File Name : Get-ChallengeFile.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
#> #>

View File

@ -19,6 +19,7 @@ function Connect-To {
- FTP Establish a connection to a FTP host. - FTP Establish a connection to a FTP host.
- NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer. - NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer.
- VMware Establish a connection to a VMware vCenter or ESXi host. - VMware Establish a connection to a VMware vCenter or ESXi host.
- CisServer Establish a connection to a Vmware CisServer.
.PARAMETER Credentials .PARAMETER Credentials
Use this parameter to bypass the stored credentials. Without this parameter Connect-To tries to read the Use this parameter to bypass the stored credentials. Without this parameter Connect-To tries to read the
@ -40,10 +41,19 @@ function Connect-To {
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
.EXAMPLE
Connect-To -RemoteHost "ftp.myside.local" -Type FTP Connect-To -RemoteHost "ftp.myside.local" -Type FTP
.EXAMPLE
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
.EXAMPLE
Connect-To -RemoteHost "esx01.myside.local" -Type VMware Connect-To -RemoteHost "esx01.myside.local" -Type VMware
.EXAMPLE
Connect-To -RemoteHost "vCenter.myside.local" -Type CisServer
.EXAMPLE .EXAMPLE
$MyCreds = Get-Credential $MyCreds = Get-Credential
Connect-To -RemoteHost "vcr01.myside.local" -Type VMware -Credentials $MyCreds Connect-To -RemoteHost "vcr01.myside.local" -Type VMware -Credentials $MyCreds
@ -51,9 +61,11 @@ function Connect-To {
Disconnect-From -RemoteHost "vcr01.myside.local" -Type VMware Disconnect-From -RemoteHost "vcr01.myside.local" -Type VMware
.NOTES .NOTES
```
File Name : Connect-To.ps1 File Name : Connect-To.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : PSFTP, PowerCLI Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
@ -70,7 +82,7 @@ function Connect-To {
[Parameter(Mandatory = $true, ParameterSetName = "Shared")] [Parameter(Mandatory = $true, ParameterSetName = "Shared")]
[Parameter(Mandatory = $true, ParameterSetName = "Private")] [Parameter(Mandatory = $true, ParameterSetName = "Private")]
[ValidateSet("CiscoUcs", "FTP", "NetAppFAS", "VMware")] [ValidateSet("CiscoUcs", "FTP", "NetAppFAS", "VMware", "CisServer")]
[String]$Type, [String]$Type,
[Parameter(Mandatory = $False, ParameterSetName = "Shared")] [Parameter(Mandatory = $False, ParameterSetName = "Shared")]
@ -199,6 +211,20 @@ function Connect-To {
Write-Error @MessageParams Write-Error @MessageParams
} }
} }
"CisServer" {
try {
Connect-CisServer -Server $RemoteHost -Credential $creds -ErrorAction Stop | Out-Null
}
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
}
}
default { default {
# Write a error message to the log. # Write a error message to the log.
$MessageParams = @{ $MessageParams = @{

View File

@ -15,11 +15,11 @@ function Disconnect-From {
.PARAMETER Type .PARAMETER Type
Specify the host type of the target. Currently implemented targets are: Specify the host type of the target. Currently implemented targets are:
- CiscoUcs Establish a connection to a Cisco UCS Fabric Interconnect. - CiscoUcs Terminates the connection from a Cisco UCS Fabric Interconnect.
- FTP Establish a connection to a FTP host. - FTP Terminates the connection from a FTP host.
- NetAppFAS Establish a connection to a NetApp Clustered ONTAP filer. - NetAppFAS Terminates the connection from a NetApp Clustered ONTAP filer.
- VMware Establish a connection to a VMware vCenter or ESXi host. - VMware Terminates the connection from a VMware vCenter or ESXi host.
- CisServer Terminates the connection from a Vmware CisServer.
.PARAMETER Force .PARAMETER Force
Force the disconnect, even if the disconnect would fail. Force the disconnect, even if the disconnect would fail.
@ -44,10 +44,15 @@ function Disconnect-From {
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True
.EXAMPLE
Disconnect-From -RemoteHost "vcenter.myside.local" -Type CisServer
.NOTES .NOTES
File Name : Disconnect-To.ps1 ```
File Name : Disconnect-From.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
@ -59,7 +64,7 @@ function Disconnect-From {
[string]$RemoteHost, [string]$RemoteHost,
[Parameter(Mandatory = $true)] [Parameter(Mandatory = $true)]
[ValidateSet("CiscoUcs", "FTP", "NetAppFAS", "VMware")] [ValidateSet("CiscoUcs", "FTP", "NetAppFAS", "VMware", "CisServer")]
[string]$Type, [string]$Type,
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
@ -85,7 +90,25 @@ function Disconnect-From {
} }
Write-Error @MessageParams Write-Error @MessageParams
} }
}
"CisServer" {
try {
if ($Force) {
Disconnect-CisServer -Server $RemoteHost -Confirm:$false -ErrorAction Stop -Force:$true
}
else {
Disconnect-CisServer -Server $RemoteHost -Confirm:$false -ErrorAction Stop
}
}
catch {
# Write a error message to the log.
$MessageParams = @{
Message = "Unable to disconnect from {0} using Type {1}." -f $RemoteHost, $Type
ErrorAction = "Stop"
}
Write-Error @MessageParams
}
} }
# Check for an existing WinSCP Session var # Check for an existing WinSCP Session var
"FTP" { "FTP" {

View File

@ -26,6 +26,12 @@
"Modules": [ "Modules": [
"DataONTAP" "DataONTAP"
] ]
},
{
"Name": "CisServer",
"Modules": [
"VMware.VimAutomation.Cis.Core"
]
} }
] ]
} }

View File

@ -19,9 +19,11 @@ function Get-RandomKey {
.\Get-RandomKey -Size 24 .\Get-RandomKey -Size 24
.NOTES .NOTES
```
File Name : Get-RandomKey.ps1 File Name : Get-RandomKey.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore

View File

@ -40,9 +40,11 @@ function Resolve-Dependency {
} }
.NOTES .NOTES
```
File Name : ResolveDependency.ps1 File Name : ResolveDependency.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore

View File

@ -34,9 +34,11 @@ function Test-Module {
.\Test-Dependency -Name 'VMware.PowerCLI' -Type 'Module' -StopIfFails .\Test-Dependency -Name 'VMware.PowerCLI' -Type 'Module' -StopIfFails
.NOTES .NOTES
```
File Name : Get-RandomKey.ps1 File Name : Get-RandomKey.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore

View File

@ -31,10 +31,11 @@ function Get-CredentialStoreItem {
$myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" $myCreds = Get-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
.NOTES .NOTES
```
File Name : Get-CredentialStoreItem.ps1 File Name : Get-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
#> #>

View File

@ -31,10 +31,11 @@ function New-CredentialStoreItem {
New-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" New-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
.NOTES .NOTES
```
File Name : New-CredentialStoreItem.ps1 File Name : New-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
#> #>

View File

@ -31,9 +31,11 @@ function Remove-CredentialStoreItem {
Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc Remove-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc
.NOTES .NOTES
```
File Name : Remove-CredentialStoreItem.ps1 File Name : Remove-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore

View File

@ -30,9 +30,11 @@ function Set-CredentialStoreItem {
Set-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc Set-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local" -Identifier svc
.NOTES .NOTES
```
File Name : Set-CredentialStoreItem.ps1 File Name : Set-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore

View File

@ -37,9 +37,11 @@ function Test-CredentialStoreItem() {
} }
.NOTES .NOTES
```
File Name : Test-CredentialStoreItem.ps1 File Name : Test-CredentialStoreItem.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore

View File

@ -25,10 +25,11 @@ function Get-CredentialStore {
$CSContent = Get-CredentialStore -Path "C:\TMP\mystore.json" $CSContent = Get-CredentialStore -Path "C:\TMP\mystore.json"
.NOTES .NOTES
```
File Name : Get-CredentialStore.ps1 File Name : Get-CredentialStore.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
#> #>

View File

@ -41,10 +41,11 @@ function New-CredentialStore {
# Creates a new shared CredentialStore in the given location. # Creates a new shared CredentialStore in the given location.
.NOTES .NOTES
```
File Name : New-CredentialStore.ps1 File Name : New-CredentialStore.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
#> #>

View File

@ -15,10 +15,11 @@ function Test-CredentialStore {
can be decrypted across systems. can be decrypted across systems.
.NOTES .NOTES
```
File Name : Test-CredentialStore.ps1 File Name : Test-CredentialStore.ps1
Author : Marco Blessing - marco.blessing@googlemail.com Author : Marco Blessing - marco.blessing@googlemail.com
Requires : Requires :
```
.LINK .LINK
https://github.com/OCram85/PSCredentialStore https://github.com/OCram85/PSCredentialStore
#> #>

View File

@ -9,6 +9,32 @@
$CALLSIGN = 'PSCredentialStore' $CALLSIGN = 'PSCredentialStore'
Write-Host ("Callsign is: {0}" -f $CALLSIGN) -ForegroundColor Yellow Write-Host ("Callsign is: {0}" -f $CALLSIGN) -ForegroundColor Yellow
Function Invoke-InstallDependencies() {
[CmdletBinding()]
Param()
Process {
Try {
Install-PackageProvider -Name NuGet -RequiredVersion '2.8.5.208' -Force -Verbose
Import-PackageProvider -Name NuGet -RequiredVersion '2.8.5.208' -Force
Install-Module -Name 'Pester' -Scope CurrentUser -RequiredVersion '4.0.8' -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name 'posh-git' -Scope CurrentUser -RequiredVersion '0.7.1' -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name 'PSCoverage' -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber
Import-Module -Name 'Pester', 'posh-git', 'PSCoverage'
}
Catch {
$MsgParams = @{
Message = 'Could not install the required dependencies!'
Category = 'Error'
Details = $_.Exception.Message
}
Add-AppveyorMessage @MsgParams
Throw $MsgParams.Message
}
}
}
Function Invoke-AppVeyorBumpVersion() { Function Invoke-AppVeyorBumpVersion() {
[CmdletBinding()] [CmdletBinding()]
Param() Param()
@ -138,7 +164,11 @@ Function Invoke-CoverageReport() {
Function Invoke-AppVeyorPSGallery() { Function Invoke-AppVeyorPSGallery() {
[CmdletBinding()] [CmdletBinding()]
Param() Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]$OnBranch
)
Expand-Archive -Path (".\bin\{0}.zip" -f $CALLSIGN) -DestinationPath ("C:\Users\appveyor\Documents\WindowsPowerShell\Modules\{0}\" -f $CALLSIGN) -Verbose Expand-Archive -Path (".\bin\{0}.zip" -f $CALLSIGN) -DestinationPath ("C:\Users\appveyor\Documents\WindowsPowerShell\Modules\{0}\" -f $CALLSIGN) -Verbose
Import-Module -Name $CALLSIGN -Verbose -Force Import-Module -Name $CALLSIGN -Verbose -Force
Write-Host "Available Package Provider:" -ForegroundColor Yellow Write-Host "Available Package Provider:" -ForegroundColor Yellow