Examples/Vulnerable_NonAtomicTempFileCreation_1.ps1

function New-TempUnsafe1 {
    $tmp = [System.IO.Path]::GetTempFileName()
    Remove-Item $tmp
    New-Item -ItemType Directory -Path $tmp | Out-Null
    return $tmp
}