Link to home
Start Free TrialLog in
Avatar of Steve Randazzo
Steve RandazzoFlag for United States of America

asked on

Issues with Outlook/Gsuite mail duplicate calendar cleanup Using "Remove-DuplicateItems.ps1"

I am using a powershell script to hopfully cleanup a users email. BUT the setup is very strange to me and foreign. I am hoping someone can make help me figure out a  few things in hopes of getting this matter resolved.

The office is using gsuite sync/Gmail  for their mail backbone but using outlook on their local hardware to interface the mail. One of the users somehow used the guite sync and created multiple profiles and her email now has multiple calendars in her outlook.  I have tried removing them manually but this didnt really fix the issue because she stated  recently there are still some left. I recently downloaded the  "remove-DuplicateItems.ps1 script from MSN and it works but I run into a few items that are a bit beyond my knowledge and or experience and can use some tips and points on how to get this script working. I got most of it figured out but ran into an issue and here it is .....I am curious do I need the autodiscover if the pst and gsm file for outlook and gsuite sync are on lcoal machine? and do I need to point the script to them to scan for duplicate calendar items ?  



PS C:\users\gail.kaplan\downloads\New folder> .\Remove-DuplicateItems.ps1 -Identity gail.kaplan -Type Calendar -Impersonation -DeleteMode MoveToDeletedItems -Mode Full -Verbose
VERBOSE: Loading C:\Program Files\Microsoft\Exchange\Web Services\2.2\\Microsoft.Exchange.WebServic
es.dll
VERBOSE: Loaded EWS Managed API v15.00.0913.015
VERBOSE: Set to trust all certificates
VERBOSE: Processing items of type Calendar, delete mode is MoveToDeletedItems
Processing mailbox gail.kaplan (gail.kaplan@gkaplanlaw.com)
VERBOSE: Using gail.kaplan@gkaplanlaw.com for impersonation
VERBOSE: Looking up EWS URL using Autodiscover for gail.kaplan@gkaplanlaw.com
C:\users\gail.kaplan\downloads\New folder\Remove-DuplicateItems.ps1 : Autodiscover failed, error:
Exception calling "AutodiscoverUrl" with "2" argument(s): "The Autodiscover service couldn't be
located."
At line:1 char:1
+ .\Remove-DuplicateItems.ps1 -Identity gail.kaplan -Type Calendar -Imp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-DuplicateI
   tems.ps1
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

G-suite is not exchange based ergo exchange tools will not work.
Avatar of Steve Randazzo

ASKER

Yes I understand that but it does use a pst file on the local machine. I guess if there is  a way to avoid the url piece and just focus on the pst file?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.