Comments (9)

  1. Anonymous says:

    Great script… but..
    I have a need to:-
    connect any new users to a particular Windows 7 Pro (outlook 2007) machine to ALL PST files within C:Outlook*.pst
    could I be cheeky and ask for assistance on this one please? the computer – due to restrictions – is NOT part of a domain. and I am an administrator.
    Many Thanks

  2. sk says:

    please correct me if i am wrong, but isn't this script the same as the one posted here: blogs.technet.com/…/scripting-adding-pst-files-to-an-outlook-profile-automatically.aspx

    to add the PSTs to the Outlook profile?

    Also, there is a PST discovery tool that was recently rolled out by MS to perform these steps through a GUI – PST Capture http://www.microsoft.com/…/details.aspx

  3. On the PST Discovery tool: This script only lists the PSTs. The client in question wanted to keep pst files in place but know where they were and move them to local discs.

  4. Marc says:

    XOUser8334, have a look at this one: http://blogs.technet.com/b/messaging_and_beyond/archive/2012/05/10/scripting-adding-pst-files-to-an-outlook-profile-automatically.aspx

    With some adaptation it should be possible to get a list of all files with a PST extension and connect them in to outlook

  5. noob2 says:

    can u please tell me which part that need to modify to make this script work at my pc?

  6. Graeme says:

    Thanks for the script, have used it (modified slightly) and it works well. Thanks for sharing. couple of comments though… The line "Set objFile = objFSO.CreateTextFile(strDirectory & strFile)" that creates a new file if the output file doesn’t exist
    holds the file locked so that the line fails with access denied the first time the script runs. The first line is in fact completely unnecessary as the later command will create the file if it doesn’t exist. Otherwise you should have objFile.close after creating
    the file. Also the script produces several blank lines in the output folder which is a minor annoyance, but can be filtered out using Trim. The output file is constantly appended to, not updated. So if you were to use this in a login script for example you
    would quickly have the same PST’s listed over and over (Change for ForAppending to ForWriting to change this) noob: there are several changes that are necessary to make this work on a local PC. change the line strDirectory = "c:usersmarcdektemp" so that
    the path is where you want to save the txt file find and delete the following lines entirely: strDirectoryUNC= strFileUNC= ———— If objFSO.FileExists(strDirectory & strFile) Then Set objFolder2 = objFSO.GetFolder(strDirectory) Else Set objFile = objFSO.CreateTextFile(strDirectory
    & strFile) End If ———— objTextFileUNC.WriteLine(GetPSTPath(objFolder2.StoreID))

  7. abaig says:

    I am getting this error when I run this VB script.
    Microsoft VBScript runtime error: ActiveX component can’t createobject: ‘Outlook.Application’ Please advice what I am doing wrong.

  8. Evg1 says:

    Thanks for script. But i have a problem with output file characters. Russian letters in that file shows corrupted like "C:UsersevgDocuments$09;K Outlookarchive.pst" Plz! help resolve this problem! or maybe some advise help