<# .SYNOPSIS Creates a new temporary directory. #> function New-TemporaryDirectory { $path = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName()); New-Item -ItemType Directory $path; } <# .SYNOPSIS Checks whether the current user is the setup user. #> function Test-SetupUser { ($IsWindows ? $env:UserName : $env:USER) -eq (Get-SetupUser); }