Register-SystemRestart

Sets a script internal flag that initiates a restart at the end of the package. The flag can be set implicitly within the script by commands such as Install-FileList if they want to manipulate files that are in access and therefore work with temporary files that are replaced at startup. The flag can also be set manually with this command if the automatic setting is either not done or a restart is to be forced. The opposite of this command - clearing the restart flag - is done with the Unregister-SystemRestart command.


Settings:

  • Ask user before restarting Windows
    If this option is enabled, the user is also asked whether the required restart should be performed when the command is executed in a service context.


Corresponds to DSM eScript command:

  • System_Reset


See also: