Get-RemoteMailbox $UPN | Enable-RemoteMailbox -Archive

Ahamed, Asif 21 Reputation points
2022-10-25T14:40:08.237+00:00

$upn="firstname.LastName@keyman .com"
Get-RemoteMailbox $UPN | Enable-RemoteMailbox -Archive

when I run the above cmdLet I get error Format-default: The collection has not been initialized. it has not been requested or the request has not been executed
Please help me

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,426 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,427 questions
{count} votes

Accepted answer
  1. Rich Matheisen 45,416 Reputation points
    2022-10-25T17:55:25.697+00:00

    Your error message doesn't say which cmdlet produced the error.

    Start with something simple. Does this work?

    $upn="firstname.LastName@domain.com"  
    Get-RemoteMailbox $UPN  
    

    If it does, try this:

    $upn="firstname.LastName@domain.com"  
    $m = Get-RemoteMailbox $UPN  
    Enable-RemoteMailbox -Identity $m.distinguishename -Archive  
    

    I can find instances of this problem for SharePoint, but not for Exchange.


0 additional answers

Sort by: Most helpful