Public/Functions/split/Set-BootmgrTimeout.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function Set-BootmgrTimeout {
    <#
    .SYNOPSIS
    BCD: Sets the Bootmgr Timeout in seconds
 
    .DESCRIPTION
    BCD: Sets the Bootmgr Timeout in seconds
 
    .EXAMPLE
    Set-BootmgrTimeout -Timeout 10
 
    .LINK
    https://github.com/OSDeploy/OSD/tree/master/Docs
    #>

    
    [CmdletBinding()]
    [OutputType([System.Void])]
    param (
        # Timeout value in seconds
        [Parameter(Position = 0, Mandatory = $True)]
        [uint32]
        $Timeout
    )
    Write-Verbose $MyInvocation.MyCommand

    Block-StandardUser
    $null = bcdedit /set '{bootmgr}' timeout $Timeout
}