2017-03-10 7 views
0

PowerShellを使用して、フォルダレベルのユーザーの "既定"ユーザーのアクセス権のレベルが特定のOU内のユーザーのExchange環境にあるすべてのメールボックスをエクスポートする「なし」と等しいこのために私は次のコマンドを使用しています:このコマンドを実行するときExchange PowerShell:メールボックスフォルダのアクセス権をエクスポートする

$AllMailbox = Get-Mailbox -OrganizationalUnit "DNofOU" -ResultSize Unlimited 
$ResultData = foreach ($Mailbox in $AllMailbox) 
    { 
     Get-MailboxFolderPermission $Mailbox | Where-Object {$_.User -Match "Default" -AND $_.AccessRights -NotMatch "None"} | Select-Object Identity,AccessRights,@{Name="Name"; Expression={$Mailbox.Name}} 
    } 
$ResultData | Export-CSV -Path C:\temp\MailboxFolderPermissions.csv 

はしかし、私は次のエラーを取得する:

Cannot process argument transformation on parameter 'Identity'. Cannot convert the "DisplayNameOfMailbox" value of type "Deserialized.Microsoft.Exc hange.Data.Directory.Management.Mailbox" to type "Microsoft.Exchange.Configuration.Tasks.MailboxFolderIdParameter". + CategoryInfo : InvalidData: (:) [Get-MailboxFolderPermission], ParameterBindin...mationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MailboxFolderPermission + PSComputerName : FQDNofExchangeServer

環境がしたWindows Server 2008 R2サーバー上のExchange 2010に基づいていますPowerShellバージョン2.0また、Exchange Serverにリモート接続する際に、PowerShellバージョン4.0のWindows Server 2012 R2サーバーから実行することもできます。

答えて

0

私にとっては、オブジェクトの正式な名前を使用する方が効果的でした。 ので、同じように:このためには答えかまだ見つかっていますが、おそらく組織単位内のすべてのメールボックスを取得する可能性がどのように私の入力を提供するために思っている場合

$mailboxArray = Get-Mailbox -OrganizationalUnit "example.com/Accounts" -ResultSize Unlimited 

私は確認されませんでした。

関連する問題