Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell script to copy all files of certain extension to share

$
0
0

I'm looking to backup users PST files with a powershell script. I already have a way to pull the latest shadowcopy and place it in C:\MyShadow.

I need a script that will search C:\MyShadow for all .PST files and output to \\server\EmailBackup\%computername% (or any other identifiable variable)

There may be several users on any pc, so there might be multiple Outlook.pst files on each computer because they are inside the users' folder. That is why i think i need to keep the directory structure when copying. I only want to copy folders that contain .pst files. 

It needs to copy to a network share using some sort of a variable so that i can identify what computer it was from. 


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>