Forum Discussion

TechAgent's avatar
TechAgent
Copper Contributor
Dec 14, 2020

Exchange online PowerShell timeout

Hi All,

 

I am running one PowerShell script is a long-running script. Initially, it is running successfully after 90 min approx it starts giving an error that cmdlet not recognized. For example below error

 

get-mailboxstatistics : The term 'get-mailboxstatistics' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.

At C:\Users\Admin\Desktop\archive.ps1:17 char:17
+ $archivestats = get-mailboxstatistics $mailbox.userprincipalname -arc ...
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (get-mailboxstatistics:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

2 Replies

Resources