Syntax for using do shell script "sudo restart password"?

I searched around the archives and this was about all I found… I just need help on getting the correct syntax for using sudo restart and supplying my admin password all in the do shell script command. Thanks.

I’ve tried:
“sudo restart password”
“sudo restart | password”
2 lines of do shells with the password on the second
“echo ‘password’ | sudo restart” (taken from above topic)

I don’t know what I’m doing >.< Help!

Don’t use sudo with do shell script.

Technical Note TN2065: do shell script in AppleScript

Also, would this work?

tell application "System Events" to restart

Edit: Also (from TN2065):

Thanks Bruce! :slight_smile: I specifically needed to have the computer restart so the first part works just fine. I was having it gui click restart. in the apple menu >.<