Google Ads

Wednesday, 30 December 2015 14:54

Script to remove all PST references (files) from a profile

Rate this item
(1 Vote)

With the following vbs script we achive to remove pst references form the outlook profile. To use, copy the code below and paste it into Notepad. Save the file with a vbs extension. 

On Error Resume Next
Dim objOutlook 'As Outlook.Application
Dim Stores     'As Outlook.Stores
Dim objFolder  'As Outlook.Folder
Dim i          'As Integer
Set objOutlook = CreateObject("Outlook.Application")
Set Stores = objOutlook.Session.Stores
For i =  Stores.Count to 0 step -1
If Stores(i).ExchangeStoreType = 3 Then
   Set objFolder = Stores(i).GetRootFolder
   objOutlook.Session.RemoveStore objFolder
End If




Read 82481 times Last modified on Wednesday, 30 December 2015 15:14