Skip to content

New Workplace

oliwex edited this page Dec 6, 2021 · 1 revision
function New-Workplace
{
    do
    {
        $workplacePath=Read-Host "Get Path for Report:"
        $isPathCorrect=(([string]::IsNullOrWhiteSpace($workplacePath)) -or (Test-Path -Path $workplacePath -PathType Container))
    }
    while ($isPathCorrect)

    New-Item -Path $workplacePath -ItemType Directory | Out-Null
    $workplacePath
}
  • Type - private
  • Input
  • Output
    • $workplacePath - path to workplace of the script
Clone this wiki locally