How to disconnect PST file from Outlook using Powershell?
I'm trying to write a script to disconnect PSTs files from Outlook. I've been trying with something like this: $Outlook = new-object -com outlook.application $Namespace = $Outlook.getNamespace("MAPI") $PSTtoDelete = "c:\test\pst.pst" $Namespace.RemoveStore($PSTtoDelete) I get the following error: "Cannot Find overload for "RemoveStore" and the argument count "1". I also tried a different solution with this (found here http://www.mikepfeiffer.net/2013/04/how-to-test-outlook-pst-personal-folder-file-access-with-powershell/ ) : $namespace.GetType().InvokeMember('RemoveStore',[System.Reflection