Script to backup PST files

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Goran Ipac Goran Ipac 1 week, 3 days ago.

  • Author
    Posts
  • #58974
    Profile photo of Goran Ipac
    Goran Ipac
    Participant

    Hello, my dear friends.
    As topic headline says, im trying to accomplish this task with powershell.
    I need to copy all related PST files from computersand from all users in my network(around 30)
    I tested my solution and it worked fine, when im copying txt file from default C$ location.
    My question is, how can i add all users from specific computers to variable so i can add it to my script?
    As far as it goes, i created variable which stores computer names from txt file and then, for each loop copies files to remote server.

    If you guys need any clarification, i will do my best to explain further.
    Tnx in advance!

  • #59068
    Profile photo of Don Jones
    Don Jones
    Keymaster

    So, you have a variable with all the computer names.

    I don't think I understand "...add all users from specific computers." Do you have a list of user names someplace, or do you just need to enumerate the user folders under C:\Users?

  • #59106
    Profile photo of Goran Ipac
    Goran Ipac
    Participant

    First, tnx Don for quick reply, its a honor to discuss powershell topics with you.
    I managed to acomplish what i wanted with couple of for each and if loops.
    If someone is interested, i would gladly share my work.
    I managed to access all computers from list, get all the directories in user folder, exclude documents, etc and grab all the.pst files and then, i checked if there is already a folder with the same name on destination and if not, create it and copy backups there.

You must be logged in to reply to this topic.