Skip to content

Function Folder

Chris Hunt edited this page May 23, 2016 · 1 revision

Folder

SYNOPSIS

Test if a folder exists.

DESCRIPTION

Test if a folder exists.

PARAMETERS

Target [String]

[Parameter(
  Mandatory = $true,
  Position = 2,
  ParameterSetName = 'Set 1')]

Should [ScriptBlock]

[Parameter(
  Mandatory = $true,
  Position = 3,
  ParameterSetName = 'Set 1')]

Assertions

Exist

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

folder $env:ProgramData { should exist }

-------------------------- EXAMPLE 2 --------------------------

folder C:\badfolder { should not exist }