Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Re: find pst files

Reply
 
Old 12-27-2007   #1 (permalink)
Shay Levi


 
 

Re: find pst files


I think the copy will fail. the best way to know for sure is to create a
PST on your local computer, attach it to your outlook while it's open,
copy some messages to it and then try to copy it.




-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic


Quote:

> thank you Shay,
> thanks for the advice.
> what if the file is in use by outlook? is there a way to force the
> copy?
>
> --Ilann
> "Shay Levi" <no@xxxxxx> wrote in message
> news:8766a94415b688ca16d4f167d96e@xxxxxx
Quote:

>> Hi Ilann,
>>
>> If I were you I would create a folder for each user on the
>> destination folder to avoid overwriting PST files of other users that
>> share the same name, as in archive.pst.
>>
>> Make sure the user running the script has write permmision on the
>> destination folder. Also make sure the files are not in use by
>> outlook. Another issue is if the move operation wasn't successful,
>> the PST file can get corrupted. I think it is better to copy the file
>> first and if no error occured delete the local one.
>>
>> Note, consider searching for OST files if you're users use Outlook in
>> Cache Exchange Mode.
>>
>> $user = $env:username
>>
>> get-childitem c:\ *.pst -rec | foreach { # the -force creates the
>> user
>> destination folder on the fly if it doesn't exist
>> # remove -whatif on production
>> copy-item $_ -destination \\server\folder\$user -force -whatif # if
>> no
>> error occured
>> if($?) { # consider not removing the files for few days just to make
>> sure nothing went wrong.
>> # you can always run the script again and delete the files.
>> remove-item $_ -force -whatif } else { write host "error file copy:
>> $($_.fullname)"
>> }
>> }
>> -----
>> Shay Levi
>> $cript Fanatic
>> http://scriptolog.blogspot.com
>> Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
Quote:

>>> Hi,
>>>
>>> I need to find pst files on all desktops and move those files on a
>>> fileserver. how could I do that via a script?
>>>
>>> --Ilann
>>>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Cannot find files? Vista file management
cant find the jpeg files in my temp internet files Vista file management
where are the files? i need to find them Vista mail
Re: find pst files PowerShell
Search for files and folders doesn't find system files Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46