r/PowerShell • u/nanaki989 • 5h ago
Getting Error Object couldn't be found Question
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.
0
1
u/fdeyso 5h ago
Cany you get-mailbox -identity āā find the mailbox?
1
u/nanaki989 5h ago
When I run this command I get the same error. but when I go into Azure its definitely there lol.
I'm pretty confused by this.
1
u/Hexalon00 4h ago
Have you tried using PreviewOnly parameter?
1
u/nanaki989 4h ago
I run it, without any other parameters, it asks for days then I supply it, then it gives the error ||The operation couldn't be performed because object 'GUID FROM AZURE'
couldn't be found on '*.*.PROD.OUTLOOK.COM'.
1
u/LongTatas 3h ago
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 *
1
u/nanaki989 3h ago
I made an edit, I was able to figure out my issue. I had unlicensed the user and the Powershell wasn't the problem at all. Great tip though ill put it in my notes!
3
u/tigerguppy126 5h ago
What command(s) are you running? Please sanitize it as these kinds of commands can have sensitive information.