2

I want to get a list of folders of my mailbox in PowerShell.

Since we're having ExchangeOnline, I connect to my exchange server like this:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange `
           -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred `
           -Authentication Basic -AllowRedirection
Import-PSSession $Session

Now to my problem, Get-MailboxFolderPermission works, but Get-MailboxFolder always returns The mailbox [email protected] is not available. why?

PS Z:\Powershell-Scripts\Functions\Exchangeonline> Get-MailboxFolderPermission "[email protected]:\Inbox"

FolderName           User                 AccessRights                                                                                                 SharingPermissionFlags                                                                                     
----------           ----                 ------------                                                                                                 ----------------------                                                                                     
Inbox                Standard             {None}                                                                                                                                                                                                                  
Inbox                Anonym               {None}                                                                                                                                                                                                                  



PS Z:\Powershell-Scripts\Functions\Exchangeonline> get-mailboxfolder "[email protected]:\Inbox"
Das angegebene Postfach "[email protected]" ist nicht vorhanden.
    + CategoryInfo          : NotSpecified: (:) [Get-MailboxFolder], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=AM4PR0302MB2626,RequestId=a6939056-15df-4b45-a10b-8b1cbb4a9207,TimeStamp=15.03.2018 14:31:00] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 9DD76FE4,Microsoft.Exchange.Management.StoreTasks.GetMailboxFolder
    + PSComputerName        : ps.outlook.com

I'm on PSVersion 5.1.14393.2068

edit: it does also not work on 5.1.16299.251 and 4.0

2
  • Have you tried adding -Identity before the e-mail address? Mar 15, 2018 at 15:27
  • @ToddWilcox yes. I also piped the output of get-mailbox [email protected] to get-mailboxfolder, without luck. I will try another PSVersion
    – SimonS
    Mar 15, 2018 at 15:33

1 Answer 1

0

Running Get-Help on the command gives us this:

"Use the Get-MailboxFolder cmdlet to view folders in your own mailbox. Administrators can't use this cmdlet to view folders in other mailboxes (the cmdlet is available only from the MyBaseOptions user role)."

Seems like it's doing exactly what it was built to do.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .