You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for this script, it appears to be exactly what I was looking for and very useful.
I have a small question in that i seem to produce the below error quite a lot when running this. Is this expected and can it be mitigated?
Error on proxy command 'Get-MailboxFolderStatistics -FolderScope:'Calendar' -Identity:'[email protected]'' to server xxxxxxxx.eurprd02.prod.outlook.com: Server version
15.20.5038.0000, Proxy method PSWS:
Cmdlet error with following error message:
Microsoft.Exchange.Data.Directory.ADServerSettingsChangedException: An error caused a change in the current set of domain controllers..
[Server=xxxxxxxxxxxx,RequestId=xxxxx-xxxxx-xxx-xxxxxx-578b2967c56c,TimeStamp=03/03/2022 09:38:50] .
+ CategoryInfo : NotSpecified: (:) [Get-MailboxFolderStatistics], CmdletProxyException
+ FullyQualifiedErrorId : [Server=xxxxxxxx,RequestId=xxxxxx-xxxxx-xxxxx-xxxxxxx-578b2967c56c,TimeStamp=03/03/2022 09:38:50] [FailureCategory=Cmdlet-CmdletProxyException] 9E701B98,Microsoft.Exchange.Management.Tasks.GetMailboxFolderStatistics
+ PSComputerName : outlook.office365.com
You cannot call a method on a null-valued expression.
At C:\Users\user\Documents\PowerShell Scripts\Calendar share externally.ps1:76 char:9
+ $calendarfolder = (Get-MailboxFolderStatistics $MB.PrimarySmt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
The text was updated successfully, but these errors were encountered:
That's more or less a standard issue with running Remote PowerShell against Exchange Online, as servers are regularly taken out of rotation. Not much you can do about it, but try again. I will update the script to use the new, more "robust" REST-based cmdlets when I get some time, as using them should improve the stability.
As a quick fix you can just try replacing them yourself, Get-Mailbox <> Get-EXOMailbox, Get-MailboxStatistics <> Get-EXOMailboxStatistics and so on.
It's interesting you post that, I did try to update your script to use these new cmdlets but they don't appear to be recognised when run in a function. Not sure if you had any luck with it?
Hi there,
Thanks a lot for this script, it appears to be exactly what I was looking for and very useful.
I have a small question in that i seem to produce the below error quite a lot when running this. Is this expected and can it be mitigated?
The text was updated successfully, but these errors were encountered: