Other posts found in this series
Another cool tool in the SysInternals suite is MoveFile and PendMoves. Rather than moving the file immediately the tool is used to move, rename or delete a file on restart. The System Manager looks at a special registry key to determine which files to are candidates to be operated on. I’ve created two cmdlets that mimic the function of the MoveFile tool. They both call the Win32 function MoveFileEx.
Move-FileOnReboot will (amazingly!) register a file to be moved on reboot.
Remove-FileOnReboot will do the same, except it will delete the file.
Get-PendingFileRenameOperation will return the files that are registered to be moved, renamed or delete.
I’ve also wrapped up the last two blog posts in this series in a module hosted on CodePlex. a module hosted on GitHub.












[...] PostInternals – Move-FileOnReboot, Remove-FileOnReboot, Get-PendingFileRenameOperation [...]
[...] PoshInternals – Move-FileOnReboot, Remove-FileOnReboot and Get-PendingFileRenameOperation and PoshInternals – Install-BlueScreenSaver (Adam Driscoll) [...]