Since Microsoft insists on keeping the traditional Notepad.exe in their latest Windows 10 operating system, I decided to make a script to install and replace notepad.exe with Notepad++. Since Notepad.exe is considered a system file, the script must update the file ownership before Windows will allow the NTFS permissions changes required to replace the executable file. Also to my surprise, Windows keeps three copies of Notepad.exe, so to be thorough the script will backup and replace each of the three Notepad.exe files. Using Microsoft's new Package Management Framework, installing Notepad++ was the easy part. Overall, what I assumed would be a simply copy/paste task turned into a lengthy process.
The package management framework OneGet (aka. PackageManager) brings Linux-like package management to Windows 10. OneGet is actually a module included in PowerShell 5, which is part of the new Windows Management Framework 5 (Link: WMF5). As with most PowerShell modules, the cmdlets are pretty straightforward. To get a list of available commands, use the Get-Command cmdlet.