This project facilitates the installation of a powershell module that allows you to register commands / scripts to run on next reboot. The underlying scheduled task removes itself automatically upon next reboot, however some management tools are included.
All included commands support -Verbose for further information.
Note: You are required to run any component / wrapper scripts as administrator!
Download the included RebootJob.psm1 Run Import-Module .\RebootJob.psm1 to import the command library
Powershell V3 on target machine.
Deployment platform of your choice.
Administrative permission on your target machine.
This powershell module should be imported using the following command:
Import-Module .\RebootJob.psm1
Add a powershell ScriptBlock to run at next reboot (Be aware of using unsanitised quotes!):
Add-RebootJob -PSScriptBlock {Get-Childitem 'C:\'}
Add a raw windows command to run at next reboot (you can also target exe's etc)
Add-RebootJob -Execute cmd.exe -Argument "/c"
Get-RebootJob
Remove-RebootJob -TaskName "d4d84b40-6f91-4912-8db2-73bf5f55e261"
- VS Code / MS Powershell - The main IDE and RTE used.
Just submit your pulls!
- Cameron Huggett - Complete work - NRException
This project is licensed under the MIT License - see the LICENSE.md file for details