delete only pst Files from Exchange Users

rated by 0 users
This post has 0 Replies | 1 Follower

Not Ranked
Posts 1
stoeffel2002 Posted: 01-04-2012 9:35 AM

Hello, i'm trying to create a backup script for my exchange server. I want to export all mailboxes with these script. I have two folders with read/write permissions for the Exchange Trusted Subsystem.

\\nas001\backup\vmsrv008\pst

and

\\nas001\backup\vmsrv008\pst-old

I have the following Powershell command to move the items from pst to pst-old folder. It works very good.

Move-Item $ExportShare\*.pst $ExportShareOld

But what I do first is to delete the files in the pst-old directory. My problem is now how to delete only the *.pst files where also is a mailbox in Exchange Server. I don't want to delete any *.pst files where no user exists in my Exchange Server.^

Any ideas?

Thank you very much....

Christoph

Page 1 of 1 (1 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.