FileHandling/New-TempDirectory.ps1

<#
 .Synopsis
  Creates a new temporary folder
 .Description
  Creates a new temporary folder
  .Example
  New-TempDirectory
#>

function New-TempDirectory
{
    [CmdletBinding(SupportsShouldProcess, ConfirmImpact="low")]
    param()

    if ($PSCmdlet.ShouldProcess("", "A new Temporary Folder will be created")) {
        $TempDirectoryPath = (Join-Path $env:TEMP ([System.Guid]::NewGuid().ToString()))
        New-EmptyDirectory $TempDirectoryPath
        $TempDirectoryPath
    }
}

Export-ModuleMember -Function New-TempDirectory