I got the solution already from another post:
#nobody logged on
If ($deployModeNonInteractive) {
Execute-Process "Shutdown" -Arguments "/R /F /T 10"
} else {
}