Assert-FolderExists.ps1
function Assert-FolderExists { <# .SYNOPSIS Short Description .DESCRIPTION Detailed Description .EXAMPLE Assert-FolderExists explains how to use the command can be multiple lines .EXAMPLE Assert-FolderExists another example can have as many examples as you like #> [CmdletBinding()] param ( [Parameter(Mandatory=$false, Position=0)] [System.Object] $Path = $destinationFolder ) $existsDestination = Test-Path -Path $Path if ($existsDestination -eq $false) { $null = New-Item -Path $destinationFolder -Force -ItemType Directory } } |