Link to home
Start Free TrialLog in
Avatar of FarrellFritz
FarrellFritz

asked on

Removing Outlook 2010 Calendars Users have added

In Outlook, users are able to ADD Calendars to their Calendar view  (via Right click MY CALENDARS then ADD CALENDARS).

Rarely but occasionally, we have the need to delete and re-create a user's mailbox and when we do so, these previously created links no longer work.

We've sent instructions to the users ad-nauseum on how to remove and then re-add these entries which they ignore, forget about and then submit new tickets to the Help Desk that their links don't work.

Is there any way (GP, Batch Program, Login Script, ANYTHING) where we can remove individual (or all) added calendars centrally?

Saw reference to deleting the NK2 file (doable in the login script) which does not exist in Outlook 2010, but haven't found anything else to lead me in the right direction in either Outlook or Exchange (2010).

Any help appreciated.
Avatar of Lucian Constantin
Lucian Constantin
Flag of Romania image

Try the following script but TEST IT THOROUGHLY before mass deployment!!!!

Is a PowerShell script that will delete all the calendars beneath the calendar folder:

$outlook = new-object -com Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
$folder = $namespace.GetDefaultFolder("olFolderCalendar")
$folders=$folder.folders.count
$i=1
For ($i; $i -le $folders; $i++) { 
$fldName = $folder.folders.item(1).name
write-host $fldName
$folder.folders.item(1).delete()
}

Open in new window


Hope this will help...
Avatar of FarrellFritz
FarrellFritz

ASKER

THANKS... will try.  Not so familiar with PowerShell.  Is there a way to execute this like in a (DOS) batch file that we could put in the login script?
ASKER CERTIFIED SOLUTION
Avatar of Lucian Constantin
Lucian Constantin
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial