Add a dedicated function for disabling boot message

This commit is contained in:
Manuel Thalmann 2024-08-09 13:35:12 +02:00
parent eb6ad4780e
commit ec7fc8dd6e
2 changed files with 9 additions and 1 deletions

View file

@ -450,7 +450,7 @@ $null = New-Module {
[string[]] $users = Get-Users; [string[]] $users = Get-Users;
$currentUser = Get-CurrentUser; $currentUser = Get-CurrentUser;
Set-BootMessage; Disable-BootMessage;
if ($currentUser -lt $users.Count) { if ($currentUser -lt $users.Count) {
$user = Get-LocalUser $users[$currentUser]; $user = Get-LocalUser $users[$currentUser];

View file

@ -45,4 +45,12 @@ $null = New-Module {
-Value ($options[$key]); -Value ($options[$key]);
} }
} }
<#
.SYNOPSIS
Disables the boot message.
#>
function Disable-BootMessage {
Set-BootMessage;
}
} }