Add a function for checking whether a setup is being run

This commit is contained in:
Manuel Thalmann 2024-08-06 14:32:37 +02:00
parent e9751cafa9
commit f4f568dafe

View file

@ -214,6 +214,14 @@ $null = New-Module {
Get-Config "valhalla.software.$Name"; Get-Config "valhalla.software.$Name";
} }
<#
.SYNOPSIS
Checks whether the current user is the setup user.
#>
function Test-SetupUser {
$env:UserName -eq (Get-Config "valhalla.windows.setupUser");
}
<# <#
.SYNOPSIS .SYNOPSIS
Checks whether the active session is executed with admin rights. Checks whether the active session is executed with admin rights.