Need my automator script to display the regular shutdown prompt before shutting down I'm using the script below to trigger a shutdown but I would like it to give me the normal warning menu with the 60 sec. countdown, I can't figure out the warning menu.

tell application "finder" to shut down    


I don't know what else to put so I get the normal shutdown prompt.
Use the menu item instead:

tell application "Finder" to activate
tell application "System Events"
    tell process "Finder"
        click menu item "Shut Down…" of menu 1 of menu bar 1
    end tell
end tell


If you use another system language than English use the proper shut down command instead.
At least in OS X 10.11 you have to allow Script Editor/the resulting app to control your computer in System Preferences -> Security -> Privacy -> Accessibility.



You have to copy the menu item exactly including spaces. E.g. the three dots are not three dots but an ellipsis: alt; -> … (en-US keyboard layout)