you can shut down your pc from dos prompt like this :
type .... shutdown -s ( it'll give you 30 secs to save your work and then it'll shutdown)
for restart type shutdown -r
and for logoff type shutdown -l
for more options type shutdown only.
I tested these only on win xp ...