2024-08-05 18:07:39 +00:00
|
|
|
<#
|
|
|
|
.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;
|
|
|
|
}
|
2024-08-05 22:02:07 +00:00
|
|
|
|
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
2024-09-23 01:33:17 +00:00
|
|
|
Checks whether the current user is the setup user.
|
2024-08-05 22:02:07 +00:00
|
|
|
#>
|
2024-09-23 01:33:17 +00:00
|
|
|
function Test-SetupUser {
|
|
|
|
($IsWindows ? $env:UserName : $env:USER) -eq (Get-SetupUser);
|
2024-08-08 00:28:40 +00:00
|
|
|
}
|