Quote:

Have you tried WMI?




Yes..

The following works while logged in, does not work in startup.
Code:

$rc = WMIRestart()
Function WMIRestart()
Dim $wmi, $System, $WQL, $colSystem

$wmi = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" + @WKSTA + "\root\cimv2")

$WQL = "Select * From Win32_OperatingSystem"
$colSystem = $wmi.ExecQuery($WQL)

For Each $System In $colSystem
$System.Win32ShutDown(6)
Next
EndFunction