Firefox Profile Restore PowerShell Script

On a terminal server, Firefox allows normal users to install program updates. If user2 has Firefox open while the update is installed, it creates a profile version mismatch. This forces user2 (and any other users logged in with Firefox open) to create a new, empty Firefox profile when they relaunch Firefox. The new profile is missing bookmarks, passwords, and any other saved history items.

This PowerShell script checks for the existence of an old profile, backs up both old and new profiles with a .old extension, and then copies the bookmarks, saved passwords, and history to the new profile. Firefox must have the new profile created already. The target profile with the bookmarks must be the next oldest profile. (I.e., if they launched Firefox multiple times and created two or more empty profiles, this script will not work and you’ll have to manually find the old profile).

Execute the script from the Start Menu > Run option or press WIN+R and enter the following command:

powershell.exe -noexit C:_software\firefoxprofilerestore.ps1

GitHub link to code:

View and download the Firefox profile restore script from my GitHub:

https://github.com/hungryrussian/Firefox-profile-restore