├── ProfileBackup.ps1 └── README.md /README.md: -------------------------------------------------------------------------------- 1 | #Powershell Profile Backup
2 |
3 | 4 | 5 | ![image](https://user-images.githubusercontent.com/48245017/75276609-78d30500-57d4-11ea-88f1-053f11ca2a5d.png) 6 | 7 |
Profile Backup Script:
  8 | You can choose to type in the full UNC path to your from location and your to location. OR You can choose to click the button and browse to the directories you'd like to choose.
  9 | 
 10 | If creating a new directory verify the path is correct after applying. (Sometimes it still has new folder even if you rename. Unless you click on the directory and do not hit enter when renaming.) Upon starting a backup process you are greeted by the lovely, daring, and overall badA-Voice that is the "Microsoft Zira Desktop" Screams, "WOOOOOOOO", Not really. However, the audible queues from the script help guide you and the customer on a backup journey you will never forget. On top of the audible queues from the script continues to goe as far as to calculate the overall profile size of the source directory that you are backing up. Just to give you the warm and fuzzies about just how long this backup will take. With the audible queues from the script you'd think that would be enough?
 11 | 
 12 | The Backup Process: (The meat of this script)
 13 | The script starts and ends by logging the start and end time in the LOG window. Based of what you checked any one of the following directories can be backed up.
 14 | 
 15 | -Desktop
 16 | -Documents
 17 | -Videos
 18 | -Office Quick Parts
 19 | -Documents
 20 | -Pictures
 21 | -Videos
 22 | -Fonts Directory
 23 | -Browsers (IE, FF, Chrome, Vivaldi, Opera, and Edge)
 24 | -OneNote 2016 if in one of two spots.
 25 | -Office Ribbon Data
 26 | -Office Quick Access Toolbar settings
 27 | -Outlook Settings
 28 | -Outlook Signature
 29 | -Cache Directory
 30 | -CD Burning Directory
 31 | -Cookies Directory
 32 | -Cookies\Low Directory
 33 | -Credential  Manager Directory
 34 | -Crypt Keys Directory
 35 | -Device Metadata Store Directory
 36 | -dpapiKeys Directory
 37 | -NetHood Directory
 38 | -PrintHood Directory
 39 | -Start Menu Programs
 40 | -Cache Directory
 41 | -CD Burning Directory
 42 | -Cookies Directory
 43 | -Cookies\Low Directory
 44 | -Credential  Manager Directory
 45 | -Crypt Keys Directory
 46 | -Device Metadata Store Directory
 47 | -dpapiKeys Directory
 48 | -NetHood Directory
 49 | -PrintHood Directory
 50 | -Start Menu Programs
 51 | -Quick Launch Directory
 52 | -Recent Directory
 53 | -Saved Games Directory
 54 | -Search History Directory
 55 | -Start Menu Directory
 56 | -Startup Directory
 57 | -System Certificates
 58 | -Templates
 59 | -Quick Launch Directory
 60 | -Recent Directory
 61 | -Saved Games Directory
 62 | -Search History Directory
 63 | -Start Menu Directory
 64 | -Startup Directory
 65 | -System Certificates
 66 | -Templates
 67 | -Fonts
 68 | -Adobe Signature/Security 
 69 | -Win10 Sticky Notes
 70 | -Group Policy Settings
 71 | -One Drive, if you must spend time backing up a cloud backup....
 72 | -OneDrive-Not-Yet-Syncd-Files (Yeah... find this directory in a search online. This was not an easy find for me.)
 73 | -Lastly one Custom Directory of your choosing as long as you have the correct UNC path to the location. 
 74 | This entire backup process is logged thanks to "Robocopy" and the logging available to a temporary text file. This process logs EVERYTHING during the backup as it pertains to the copying of data in the selected directories. Once the log is completed the log file is copied from the temporary location and into the "\LOG" directory appended to the end of your "Browse to Location"
 75 | 
 76 | But wait, that's definitely not all. (Like a bad infomercial)
 77 | Upon saving information from the browsers the script will check and if it finds a browser open will attempt to close the browser for you so the favorites can be saved. This same method is also done when saving info from outlook. The script will find outlook running and attempt to close it. The script doesn't stop there. If the any of the close-tasks take too long to close it will force close the application. This script also checks the main directories before and after to add another automatic layer to the backup process. In essence what it does is verify the data was moved, and all of the copied data matches the original data. If it finds the source and destination directories do not match after a copy the script will error out and you will need to resolve why this happened. (Very unlikely this would happen.)
 78 | 
 79 | When running the script you are immediately provided with the following:
 80 | Device name (To verify we are on the right computer) 
 81 | Windows User: Who is logged into the computer right now? 
 82 | Authenticated User: Who authenticated as admin to run the script?
 83 | OS Install Date: Who doesn't want this information? 
 84 | What version of windows and make.
 85 | You also have an Inventory Button:
 86 | Inventory gathers the following information and outputs it to a "\LOG" directory appended to the end of your "Browse to Location"
 87 | 
 88 | Logical Drives
 89 | PowerShell Drives
 90 | Network Drives
 91 | Connected Drives
 92 | OS Information
 93 | BIOS Settings
 94 | IPConfig Information
 95 | Local Administrators
 96 | Computer Name
 97 | Firewall Settings
 98 | Application Events - to an .evt file
 99 | System Events - to an .evt file
100 | Installed Applications
101 | Processes
102 | Services
103 | The script takes all the non .evt files and combines them into one .XLSX file, then moves it, plus the .evt files into the "\LOG" directory appended to the end of your "Browse to Location"
104 | 
105 | There are a total of three new tabs
106 | The main tab you already know. The Log tab.
107 | The second tab contains the installed programs functions listing all installed programs and giving you the ability to save this information for logging purposes.
108 | The third tab is labeled Tools. In here you are provided with all tools buttons I can think of.
109 | -Control Panel
110 | -Powershell Admin Console
111 | -DOS Admin Console
112 | -Windows 10 Settings Window
113 | -Open CMTrace (If it's installed)
114 | -Method to restart SCCM Locally
115 | -Method to repair SCCM Repository Locally
116 | -Method to reset SCCM Repository Locally
117 | -Keyboard Information
118 | -OS Information
119 | -System Information
120 | -BIOS Information
121 | -CPU Information
122 | -RAM Information
123 | -Motherboard Information
124 | -Physical Drive Information
125 | -Video Information
126 | -Network Information
127 | -Network Setting Information
128 | -Monitor Information
129 | -Mouse Information
130 | -Process Information
131 | -Services Information
132 | -Page File Information
133 | -USB Hub Information
134 | -Logical Drive Information
135 | -Optical Drive Information
136 | -Sound Card Information
137 | -Printer Information
138 | -Fan Information
139 | Tooltip's have been added to most if not all buttons.
140 | You are also given a lovely Printers Button:
141 | Printers gathers the printer information in much the same way. Or attempts to. If you run the printer button under the customer you get the correct output. This is due to "Authenticated User/Windows User". Otherwise the script opens the Devices and Printers window for you to catalog the installed printers in case there is anything other than FOLLOW_ME The script also opens up an Excel window and provides you with obviously more data than you might need. Maybe not? Not for me! (How many times did finding the same driver version work for local printers? You are welcome!)
142 | 
143 | You are also given a Programs Button:
144 | What? No Way? It's True!
145 | 
146 | This opens a quick window that shows you all of the applications and versions installed on the computer. This is so you can quickly see what is installed on the old computer and make note as to whether you need to run the Inventory Button process or not. This part is ran during the Inventory Button process, however, it does not popup, and instead saves to the .XLSX created within the Inventory Button process.
147 | 
148 | No way there's more?
149 | On top of audible queues, popups, and overall awesomeness, there is yet two more important features. First is the LOG window. This logs every state that the script goes through to the best of my ability. Second is the Copy to Clipboard. This copies the entire contents of the LOG window into the Clipboard so this can be pasted into your ticket notes.
150 | 
151 | What this script doesn't do?
152 | Steal your soul.
153 | Make you soup.
154 | Hug you, or touch you in any way.
155 | Care about your feelings.
156 | Backup data you or the customer fail to tell it to.
157 | Reads minds.
158 | Log the data in the ticket.
159 | Calls someones mom to setup a date.
160 | In fact it will not call anyone.
161 | Know who you or the customer actually are.
162 | Why should you care?
163 | You don't have to. Maybe your process is working for you, if so awesome, I am more than happy it does. Mine did not. The fact that this process is still a manual one still boggles my mind. When I started we were handed a two page document and told to follow the process off this document. No... That's being setup for failure, not success. So I worked on a better solution. This is the evolution of the initial idea. A year later. This is not a single person effort as much as it might seem so. Many people have helped contribute to the functionality and data that the script now backs up. In no way could this have ever been possible without everyone's help.
164 | --------------------------------------------------------------------------------