r/PowerShell • u/nanaki989 • Aug 19 '26
Question Getting Error Object couldn't be found
I am getting error
|The operation couldn't be performed because object 'GUID Copied from O365 Azure'
couldn't be found on 'CH5PR01A08DC004.NAMPR01A008.PROD.OUTLOOK.COM'.
I am running this in exchange management shell connected to online.
I copied the Guid directly from O365 how could it possibly not be found?
We are attempting to delete a disabled users calendars.
EDIT: I was able to determine the issue, when we disabled the user we removed the license which deleted the mailbox. When I reapplied the license it all worked fine. Thanks for the help everyone, it helped me look closer and realize it wasn't pointing at Azure obviously but Outlook. Answer was in my face the entire time.
3
u/tigerguppy126 Aug 19 '26
What command(s) are you running? Please sanitize it as these kinds of commands can have sensitive information.
1
u/fdeyso Aug 19 '26
Cany you get-mailbox -identity āā find the mailbox?
1
u/[deleted] Aug 19 '26
Have you tried using PreviewOnly parameter?
https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/remove-calendarevents?view=exchange-ps#examples
1
u/LongTatas Aug 19 '26
Try doing a Get-CalendarEvents first to verify you are connected and accessing the right spot. Iām not familiar with this cmdlet but I always verify with Get first and piping it to | select *
0
u/nanaki989 Aug 19 '26
If this would be better suited elsewhere please delete.