Options

Remote shutdown

raiedraied Member Posts: 93 ■■■□□□□□□□
Do I issue the remote shutdown (shutdown /i) command on the local or remote pc? Can someone please give more detail on this?

Thanks.

Comments

  • Options
    blargoeblargoe Member Posts: 4,174 ■■■■■■■■■□
    You can do either. If you do it from a remote pc you can add a parameter to specify the remote machine name.
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
  • Options
    sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    The syntax for shutting down a remote computer can be viewed by typing
    shutdown /? at the command prompt resulting in something like this:
    Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d upicon_mad.gifx:yy]

    No args Display this message (same as -?)
    -i Display GUI interface, must be the first option
    -l Log off (cannot be used with -m option)
    -s Shutdown the computer
    -r Shutdown and restart the computer
    -a Abort a system shutdown
    -m \\computername Remote computer to shutdown/restart/abort
    -t xx Set timeout for shutdown to xx seconds
    -c "comment" Shutdown comment (maximum of 127 characters)
    -f Forces running applications to close without warning
    -d [p]icon_mad.gifx:yy The reason code for the shutdown
    u is the user code
    p is a planned shutdown code
    xx is the major reason code (positive integer le
    ss than 256)
    yy is the minor reason code (positive integer le
    ss than 65536)


    So you could type
    shutdown -f -r -t 30 -m \\computer123 -c "I am shutting you down chump! I am the all powerful admin!!!"

    This would remotely reboot the remote computer named "computer123" after 30 seconds while displaying a nice little message on their screen and automaically force applications to close.

    To use the GUI version (shutdown -i) you can click the browse button or add a computername. Boring.
    All things are possible, only believe.
  • Options
    raiedraied Member Posts: 93 ■■■□□□□□□□
    Thank you sprkymrk for the details
  • Options
    Go BucksGo Bucks Member Posts: 152
    We had a lot of fun in college with the shutdown command icon_lol.gif

    A couple of guys would rudely play around on the Internet during lectures, but we would take care of that for the instructor. icon_wink.gif
    "Me fail English? That's unpossible."
Sign In or Register to comment.