Add a function for checking whether a setup is being run
This commit is contained in:
parent
40a422bb8e
commit
6e3e8eb4b3
|
@ -214,6 +214,14 @@ $null = New-Module {
|
|||
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
|
||||
Checks whether the active session is executed with admin rights.
|
||||
|
|
Loading…
Reference in a new issue