1

Exchange 管理シェルを使用して Exchange 2010 からユーザー免責事項をエクスポートする必要があります。それは可能ですか?免責事項の例:

Kathleen Mayer
Sales Department
Contoso
www.contoso.com
kathleen@contoso.com
cell: 111-222-1234

このスクリプトを試しましたが、結果には免責事項が含まれていませんでした:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

try {
    Import-Module ActiveDirectory -ErrorAction Stop
}
catch {
    Write-Host "Unable to load Active Directory module, is RSAT installed?"
    Exit
}

$Results = foreach ($User in (Get-ADUser -Filter * -Properties Department, Mail)) {

    $Mailbox = Get-Mailbox $User.Name -ErrorAction SilentlyContinue

    if ($Mailbox) {
        $Mail = $Mailbox | Get-MailboxStatistics -ErrorAction SilentlyContinue

        if ($Mail.TotalItemSize.Value -eq $null) {
            $TotalSize = 0
        } else {
            $TotalSize = $Mail.TotalItemSize.Value.ToBytes()
        }

        New-Object PSObject -Property @{
            Name = $User.Name
            SamAccountName = $User.SamAccountName
            Email = $User.Mail
            Department = $User.Department
            MailboxSize = $TotalSize
            IssueWarningQuota = $Mailbox.IssueWarningQuota
            ProhibitSendQuota = $Mailbox.ProhibitSendQuota
            ProhibitSendReceiveQuota = $Mailbox.ProhibitSendReceiveQuota
        }
    }
}

$Results |
    Select Name, SamAccountName, Email, `
    Department, MailboxSize, IssueWarningQuota, `
    ProhibitSendQuota, ProhibitSendReceiveQuota |
    Export-Csv c:\MailboxSizeByDepartment.csv -NoTypeInformation

このリンクを参照してください: https://technet.microsoft.com/en-us/library/dn600437%28v=exchg.150%29.aspx

4

0 に答える 0