Skip to main content

Show-InstallationRestartPrompt

SYNOPSIS

Displays a restart prompt with a countdown to a forced restart.

SYNTAX

Show-InstallationRestartPrompt [[-CountdownSeconds] <Int32>] [[-CountdownNoHideSeconds] <Int32>]
[[-NoSilentRestart] <Boolean>] [-NoCountdown] [[-SilentCountdownSeconds] <Int32>] [[-TopMost] <Boolean>]
[<CommonParameters>]

DESCRIPTION

Displays a restart prompt with a countdown to a forced restart.

EXAMPLES

EXAMPLE 1

Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60

EXAMPLE 2

Show-InstallationRestartPrompt -NoCountdown

EXAMPLE 3

Show-InstallationRestartPrompt -Countdownseconds 300 -NoSilentRestart $false -SilentCountdownSeconds 10

PARAMETERS

-CountdownSeconds

Specifies the number of seconds to countdown before the system restart. Default: 60

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: 60
Accept pipeline input: False
Accept wildcard characters: False

-CountdownNoHideSeconds

Specifies the number of seconds to display the restart prompt without allowing the window to be hidden. Default: 30

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: 30
Accept pipeline input: False
Accept wildcard characters: False

-NoSilentRestart

Specifies whether the restart should be triggered when Deploy mode is silent or very silent. Default: $true

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-NoCountdown

Specifies not to show a countdown.

The UI will restore/reposition itself persistently based on the interval value specified in the config file.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SilentCountdownSeconds

Specifies number of seconds to countdown for the restart when the toolkit is running in silent mode and NoSilentRestart is $false. Default: 5

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: 5
Accept pipeline input: False
Accept wildcard characters: False

-TopMost

Specifies whether the windows is the topmost window. Default: $true.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

You cannot pipe objects to this function.

OUTPUTS

System.String

Returns the version of the specified file.

NOTES

Be mindful of the countdown you specify for the reboot as code directly after this function might NOT be able to execute - that includes logging.

https://psappdeploytoolkit.com