Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion DeviceLockdown_Sample/Configure_DeviceLockdown.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,21 @@ function Enable-LockdownFeatures
# If feature installed and requires restart, then restart
if ($restartneeded -eq $TRUE)
{
Restart-Computer -Confirm:$TRUE -Force
$Message = "A restart is required for changes to take effect before continuing."
Log-Message ($Message)
Write-Host $Message

$Message = "You must restart the script manually after the restart has completed."
Log-Message ($Message)
Write-Host $Message -ForegroundColor Yellow


Write-Host "Do you want to restart now? [Y/N]"
$confirmation = Read-Host

if ($confirmation -eq "y" -or $confirmation -eq "Y") {
Restart-Computer -Force
}
Exit
}

Expand Down