Script to backup PST files

Welcome Forums General PowerShell Q&A Script to backup PST files

This topic contains 2 replies, has 2 voices, and was last updated by

2 years, 6 months ago.

  • Author
  • #58974

    Topics: 2
    Replies: 2
    Points: 0
    Rank: Member

    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

    Topics: 13
    Replies: 4872
    Points: 1,813
    Helping HandTeam Member
    Rank: Community Hero

    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

    Topics: 2
    Replies: 2
    Points: 0
    Rank: Member

    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.

The topic ‘Script to backup PST files’ is closed to new replies.