我想在PowerShell中得到我邮箱的文件夹列表。
既然我们有ExchangeOnline,我就像这样连接到我的交换服务器:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred `
-Authentication Basic -AllowRedirection
Import-PSSession $Session现在,对于我的问题,Get-MailboxFolderPermission可以工作,但是Get-MailboxFolder总是返回The mailbox xy@xy.com is not available。为什么?
PS Z:\Powershell-Scripts\Functions\Exchangeonline> Get-MailboxFolderPermission "xy@xy.com:\Inbox"
FolderName User AccessRights SharingPermissionFlags
---------- ---- ------------ ----------------------
Inbox Standard {None}
Inbox Anonym {None}
PS Z:\Powershell-Scripts\Functions\Exchangeonline> get-mailboxfolder "xy@xy.com:\Inbox"
Das angegebene Postfach "xy@xy.com" 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我在PSVersion 5.1.14393.2068
编辑:它在5.1.16299.251和4.0上也不起作用
发布于 2018-03-15 18:15:13
在命令上运行Get-Help将给我们以下信息:
“使用Get-MailboxFolder查看您自己邮箱中的文件夹。管理员不能使用此cmdlet查看其他邮箱中的文件夹( cmdlet只能从MyBaseOptions用户角色中获得)。”
好像它在做它所要做的事。
https://serverfault.com/questions/901833
复制相似问题