I have used the code below in the past successfully. It pokes a windows reboot command into the runonce registry The reboot happens after logon has completed successfully

Hope this helps

$reboot="%windir%\RUNDLL32.exe user.exe,ExitWindows"


WRITEVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","reboot",$reboot,"REG_SZ")

Celusil
Aka Randy Burgess