Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powershell or Vbscript

Status
Not open for further replies.

thutmose

MIS
Mar 31, 2002
24
US
I have been given the task to write a script that will do the following.

1) Identify all .pst email files stored on a network share displaying the last modified date,size and to display who the file belongs to by username. The problem is there are currently no standards where users can create .pst files. Some of the users store them at the root of the network share while others might save the file in the proper location 4 levels deep.

2) This should be displayed in a report form so that we can identify the users.

3) Another script that will copy these files down to the users PC. <--this part seems kind of trivial.

Can anyone tell me which scripting language is better suited for what I am looking for, thanks.
 
Determining the owner of a .pst file is nearly impossible to do with great certainty. You can look at the file path and see if it matches a SAMAccountName, or even an Alias. You can then look to verify that the suspected owner has full rights to the file. But that's still not perfect. Even detecting file owner isn't perfect. And, of course, network based .pst files are completely unsupported by Microsoft.

A better solution instead of copying them to the workstation (which you won't be able to do if Outlook is open, nor will you be able to easily update Outlook as to where the file's new location is) is to move them to the Exchange server and ingest them back into the mailbox.

PowerShell is best if you're using Exchange 2007 or later.

Pat Richard MVP
Plan for performance, and capacity takes care of itself. Plan for capacity, and suffer poor performance.
 
vbscripts FileSystemObject is really slow at enumerating files / folder etc compared with C#, one would hope Powershells use of .Net would mean it was as fast
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top