Please feel free to provide feedback or file bugs here.

Restart-Computer needs a parameter to give a reason for the restart

13 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Luc FULLENWARTH shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    survey  ·  AdminJ. Keith Bankston [MSFT] (Admin, Windows Server) responded  · 

    Would be interested in understanding the scenario where you are using the cmdlet & specifying the reason for rebooting. To explain: our previous assumption was that users would EITHER use the server UI that captured this information, OR use the cmdlet (often so they didn’t need to supply that reason text).
    So, what would help is to understand in what situations the cmdlet is being used and specifying the reboot explanation is desirable.

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Andy Ray commented  ·   ·  Flag as inappropriate

        Frankly, until I started moving my workflows to PowerShell I was unaware that this feature was not available. I would have assumed with the richness of PowerShell this would have been a "given". Much as Luc has already explained, while it is very nice to have a quick method for restarting a system without the GUI, which is fine in labs and lower level domains, tracking restarts via the event log is a very common practice.

        If the restart is admin initiated (EITHER by script or by GUI) - some notation on the local system can be a godsend if trying to track down issues. Admittedly, if it is voluntary or behaves like the GUI, you can largely skip through it and it does no one any good... but for "managed systems" it is proper hygiene.

      • JD commented  ·   ·  Flag as inappropriate

        From a PowerShell script, you can use:
        & shutdown /r /t 0 /c "Application xx updated." /d P:4:1

      • Luc FULLENWARTH commented  ·   ·  Flag as inappropriate

        - Nano server.

        - Administrators which are doing more than 90% of their work remotely via PS Sessions in ISE tabs don't wich to open a RDP session just to restart a server, especially if they have a bunch of servers to restart alltogether.

        - Software or server management via script

        - Restart-Computer -Wait -For WinRM is more user friendly than logging on to the server, use the GUI to restart, and then opening a shell to make a PING until the server is availlable.

        When talking about "giving a reason" I don't just mean a category (planned application, ...) I also mean a manual comment. Usually I mention the ticket number (incident, planned change, ...) or a brief summary of my action (Reboot because the server was in this state or I was doing this or that).

      Feedback and Knowledge Base