Hi. I'm very new to powershell scripting but for a project I'm working on i think powershell would be the best solution to automate our backups. I'm trying to create a script that will back up folders from multiple servers. I'm not sure where to start. I was able to write a basic script that copies file from a specific location to another but I need a more complex script to meet the requirements. Here's the requirements:
1. Copy files from muliple servers- Folder paths varies per location. example folder1 can be located on C:testtestolder on Computer A but folder 2 is located on C:test2 on Computer B
– I'm thinking of creating hash tables for each folder path with the computer name/foldername. And just creating a list so the user can just select which Computername/foldername
so If I create a hash table with the following values
Once the user executes the script it will ask her to select a server/folder to backup. Once selected the script will backup the folder based on the value specified on the table.
2. Destination location depends on user executing the script. There are about 10 users that will use the script and each user has a specified shared folder they use. Once the script is executed all files that will be backed up will be copied over to their respective shared drive.
– Again I'm thinking of using hash table with the userlist and corresponding shared path, however the challenge is a folder needs to be created on the users shared drive every backup named with the date/time the backup was done. So if user A has a shared folder of
3. User must be able to backup muliple folder when executing the script. So the script will ask user if additional backup is needed if not user can close the script. If additional backup is needed it will loop through the list of server/folder.
Any assistance with this script is greatly appreciated.