PSCredentialStore/src/ChallengeFile/Test-ChallengeFile.ps1
Marco Blessing 64af16cc08 Publish Pre-release (#1)
* adds basic module layout

* fix module manifest encoding

* fix callsign in appveyor helper

* adds challenge file related functions

* adds connection manager functions

* adds Test-ChallengeFile

* adds item related functions

* adds store related functions

* adds cSpell dictionary

* adds CredentialStore related Pester tests

* [WIP] test Pester file

* fix typo

* adds file dependencies

* [WIP] fix pester tests

* fix exception state

* [WIP] add file dependencies

* fix gitkeep filename

* set constant debug module version string

* adds Pester Tests for New-CredentialStoreItem

* adds basic readme file

* adds functions to export; adds meta data

* adds vscode debug config

* adds test for optional dependencies

* [WIP] Implements optional dependency test

* adds taskrunner definitions

* adds CBH

* add gitignore file

* adds basic Build tasks

* typo fixed

* adds build folder to ignore list

* adds Cisco and NetApp opt dependencies

* adds build task

* fix end of line dequence

* remove task.json error

* adds sources for optional modules

* enables Pester and posh-git

* prepare pre-release
2017-09-21 13:32:15 +02:00

49 lines
1.1 KiB
PowerShell

function Test-ChallengeFile {
<#
.SYNOPSIS
Simple path check for challenge file needed by the CredentialStores.
.DESCRIPTION
This is supposed to be a internal function to check the existence for a challenge file.
.PARAMETER Path
Specify the path to the challenge file.
.INPUTS
[None]
.OUTPUTS
[Bool].
.EXAMPLE
If (Test-ChallengeFile) {
Write-Host "The file exists."
}
Else {
Write-Warning "Couldn't find the given file!"
}
.NOTES
File Name : Test-ChallengeFile.ps1
Author : Marco Blessing - marco.blessing@googlemail.com
Requires :
.LINK
https://github.com/OCram85/PSCredentialStore
#>
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[String]$Path = "{0}\PSCredentialStore\Challenge.bin" -f $env:ProgramData
)
if (Test-Path $Path) {
$true
}
else {
$false
}
}