Jump to content

Ysuran

Members
  • Gesamte Inhalte

    11
  • Registriert seit

  • Letzter Besuch

Beiträge erstellt von Ysuran

  1. $RMailbox = Get-Recipient -RecipientTypeDetails Sharedmailbox -ResultSize Unlimited

    $(Foreach ($R in $RMailbox){

    $St = $R | Get-MailboxStatistics

    New-Object PSObject -Property @{

    Name = $R.Name

    Email = $R.PrimarySmtpAddress

    LastLoggedOnUserAccount = $St.LastLoggedOnUserAccount

    LastLogonTime = $St.LastLogonTime

    LastLogoffTime = $St.LastLogoffTime

    FullMBXPerm = ($R | Get-MailboxPermission |?{$_.AccessRights -like "Fullaccess" -and $_.User -NotMatch "(Self|SYSTEM|^S-1-5-)"} | %{$_.User.ToString()}) -join ","

    SendAs = ($R | Get-ADPermission |?{$_.ExtendedRights -like "Send-as" -and $_.User -NotMatch "(Self|SYSTEM|^S-1-5-)"} | %{$_.User.ToString()}) -join ","

    Owner = (Get-Mailbox $R.Manager).PrimarySmtpAddress

    }

    }) | Select Name,Email,Owner,FullMBXPerm,SendAS,Last*

     

    funktioniert leider auch nicht:

    Get-Recipient : The term 'Get-Recipient' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

    spelling of the name, or if a path was included, verify that the path is correct and try again.

    At C:\Scripts\SharedMailboxes-Manager\SharedMailboxes-Manager.ps1:1 char:13

    + $RMailbox = Get-Recipient -RecipientTypeDetails Sharedmailbox -Result ...

    + ~~~~~~~~~~~~~

    + CategoryInfo : ObjectNotFound: (Get-Recipient:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException

  2. Hallo zusammen,

    ich brauche eine Auflistung aller Shared Mailboxes mit bzw. ohne Manager.

    Folgende Scripts haben nicht den gewünschten Erfolg gebracht:

    Get-Recipient -Resultsize unlimited | where {$_.RecipientTypeDetails -eq "SharedMailbox"} | ft Name,Manager >C:\temp\shared.csv

    = CSV mit 0 KB
    Get-Mailbox -ResultSize Unlimited | Where-Object { $_.RecipientTypeDetails -eq "SharedMailbox" } | fl Name,Manager
    = keine Ausgabe

     

    Hat jemand noch eine Idee?

  3. Thema ist gelöst! Code wie folgt:

     

    #Definitions
    $date = Get-Date -format "dd.MM.yyyy"
    $time = Get-Date -format "HH:mm"
    $timestamp = Get-Date -format "dd.MM.yyyy-HHmmss"

    ##################################################################################
    # SETTINGS
    ##################################################################################
    #$SmtpServer           = The SMTP-server who's responsible for sending the mail
    #$smtpFrom             = The displayed sender of the mail
    #$smtpTo               = The recipient of the message
    #$messagesubject       = The subject of the message
    #$FilePathName         = Path and name of the exportfile
    #$DeleteExportOnServer = Keep exportfile after sending on the server (1 = Keep exportfile/everything else = delete exportfile
    ##################################################################################
    $SmtpServer = 'localhost'
    $smtpFrom = 'XXX'
    $smtpTo = 'XXX'
    $messagesubject = 'Datenbankstand vom ' + $date + ' um ' + $time + ' Uhr'
    $FilePathName = "C:\temp\export-" + $timestamp + '.csv'
    $DeleteExportOnServer = "0"
    ##################################################################################


    Set-ADServerSettings -ViewEntireForest $true
    $message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
    $message.Subject = $messageSubject
    $message.IsBodyHTML = $true
    $result = Get-Mailbox -ResultSize unlimited |Select-Object DisplayName,PrimarySmtpAddress,DistinguishedName,Database,ExchangeGuid
    if (Test-Path $FilePathName) {Remove-Item $FilePathName}
    $result |Export-Csv -Path $FilePathName
    $attachment = new-object Net.Mail.Attachment($FilePathName)


    ##################################################################################
    # HTMLMessage
    ##################################################################################
    $MailBody = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    $MailBody += '<html xmlns="http://www.w3.org/1999/xhtml">'
    $MailBody += '<head>'
    $MailBody += '<meta http-equiv="content-type" content="text/html:harset=iso-8859-1">'
    $MailBody += '<title></title>'
    $MailBody += '</head>'
    $MailBody += '<body>'
    $MailBody += '<b>Datenbankstand vom ' + $date + ' um ' + $time + ' Uhr:</b>'
    $MailBody += '<table border="1">'
    $MailBody += '  <tr>'
    $MailBody += '    <th>DisplayName</th>'
    $MailBody += '    <th>PrimarySmtpAddress</th>'
    $MailBody += '    <th>DistinguishedName</th>'
    $MailBody += '    <th>Database</th>'
    $MailBody += '    <th>ExchangeGuid</th>'
    $MailBody += '  </tr>'

    foreach ($i in $result) {
     $MailBody += '  <tr>'
     $MailBody += '    <td>' + $i.DisplayName + '</td>'
     $MailBody += '    <td>' + $i.PrimarySmtpAddress + '</td>'
     $MailBody += '    <td>' + $i.DistinguishedName + '</td>'
     $MailBody += '    <td>' + $i.Database + '</td>'
     $MailBody += '    <td>' + $i.ExchangeGuid + '</td>'
     $MailBody += '  </tr>'
    }

    $MailBody += '</table>'
    $MailBody += '</body>'
    $message.Body = $MailBody
    ##################################################################################


    $message.Attachments.Add($attachment)
    $smtp = New-Object Net.Mail.SmtpClient($smtpServer)
    $smtp.UseDefaultCredentials = $true
    $smtp.Send($message)
    $message.Dispose()
    $attachment.Dispose()
    if ((Test-Path ($FilePathName)) -and !($DeleteExportOnServer -eq "1")) {Remove-Item $FilePathName}

  4. Hallo zusammen,

    ich habe folgendes Script:

     

    #Definitions
    $date = Get-Date -format "dd.MM.yyyy"
    $time = Get-Date -format "HH:mm"
    $timestamp = Get-Date -format "dd.MM.yyyy-HHmmss"

    ##################################################################################
    # SETTINGS
    ##################################################################################
    #$SmtpServer           = The SMTP-server who's responsible for sending the mail
    #$smtpFrom             = The displayed sender of the mail
    #$smtpTo               = The recipient of the message
    #$messagesubject       = The subject of the message
    #$FilePathName         = Path and name of the exportfile
    #$DeleteExportOnServer = Keep exportfile after sending on the server (1 = Keep exportfile/everything else = delete exportfile
    ##################################################################################
    $SmtpServer = 'XX.X.X.XX'
    $smtpFrom = 'xxxxx@xxxxxxxxxx'
    $smtpTo = 'xxxxxxxx@xxxxxxxxx'
    $messagesubject = 'Datenbankstand vom ' + $date + ' um ' + $time + ' Uhr'
    $FilePathName = "C:\Temp\export\export-" + $timestamp + '.csv'
    $DeleteExportOnServer = "0"
    ##################################################################################


    Set-ADServerSettings -ViewEntireForest $true

    $message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
    $message.Subject = $messageSubject
    $message.IsBodyHTML = $true
    $result = Get-Mailbox -ResultSize unlimited |Select-Object DisplayName,PrimarySmtpAddress,DistinguishedName,Database,ExchangeGuid
    if (Test-Path $FilePathName) {Remove-Item $FilePathName}
    Get-Mailbox -ResultSize unlimited |Select-Object DisplayName,PrimarySmtpAddress,DistinguishedName,Database,ExchangeGuid |Export-Csv -Path $FilePathName
    $attachment = new-object Net.Mail.Attachment($FilePathName)


    ##################################################################################
    # HTMLMessage
    ##################################################################################
    $MailBody = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    $MailBody += '<html xmlns="http://www.w3.org/1999/xhtml">'
    $MailBody += '<head>'
    $MailBody += '<meta http-equiv="content-type" content="text/html:harset=iso-8859-1">'
    $MailBody += '<title></title>'
    $MailBody += '</head>'
    $MailBody += '<body>'
    $MailBody += '<b>Datenbankstand vom ' + $date + ' um ' + $time + ' Uhr:</b>'
    $MailBody += '<table border="1">'
    $MailBody += '  <tr>'
    $MailBody += '    <th>DisplayName</th>'
    $MailBody += '    <th>PrimarySmtpAddress</th>'
    $MailBody += '    <th>DistinguishedName</th>'
    $MailBody += '    <th>Database</th>'
    $MailBody += '    <th>ExchangeGuid</th>'
    $MailBody += '  </tr>'

    foreach ($i in $result) {
        $MailBody += '  <tr>'
        $MailBody += '    <td>' + $i.DisplayName + '</td>'
        $MailBody += '    <td>' + $i.PrimarySmtpAddress + '</td>'
        $MailBody += '    <td>' + $i.DistinguishedName + '</td>'
        $MailBody += '    <td>' + $i.Database + '</td>'
        $MailBody += '    <td>' + $i.ExchangeGuid + '</td>'
        $MailBody += '  </tr>'
    }

    $MailBody += '</table>'
    $MailBody += '</body>'
    $message.Body = $MailBody
    ##################################################################################


    $message.Attachments.Add($attachment)
    $smtp = New-Object Net.Mail.SmtpClient($smtpServer)
    $smtp.Send($message)
    $message.Dispose()
    $attachment.Dispose()
    if ((Test-Path ($FilePathName)) -and !($DeleteExportOnServer -eq "1")) {Remove-Item $FilePathName}

     

     

    Leider kommt diese Fehlermeldung:

     

    Exception calling "Send" with "1" argument(s): "The operation has timed out."
    At C:\Scripts\Mailbox-Database-Mail\MailboxDatabase.ps1:74 char:1
    + $smtp.Send($message)
    + ~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : SmtpException

     

     

    Weiß jemand was der Fehler ist?

    $smtp.Send($message) angelich...

  5. vor 13 Minuten schrieb testperson:

    Du solltest als erstes mal das CU10 für Exchange 2016 installieren.

    Welchen Hypervisor nutzt ihr?

    Wenn der alte Server (?) auf "Anschlag" steht, dann dürfte das doch auch schon ein Indiz sein.

    Du meinst CU8?

    VMWare

    Die Serveradministration ist strikt vom Exchangeadmin getrennt und die Aussage ist, dass keine Ressourcen mehr zugewiesen werden können.

     

    Aber die Antworten haben mir schon geholfen, danke. Einfach sicherstellen, dass die Platten in "Ruhephasen" genutzt werden und dann einfach warten.

  6. vor 15 Stunden schrieb testperson:

    welchen Patchstand hat denn der Exchange 2016?

    Ist das eine VM oder direkt auf Hardware?

    Was findet sich in den Eventlogs?

    Ist auf den Systemen einen Virenscanner installiert?

    Was sagt denn "Get-MoveRequest | Get-MoveRequestStatistics -IncludeReport | fl *" im Report?

    Edition: Standard

    Version 15.1 (Build 1261.35)

    VM

    Eventlog: Schaue ich mir noch genauer an, im ersten Moment aber nichts groß auffälliges

    Virenscanner: Nein
    Report: Da wird nichts ausgegeben, weil er ja bei 0% stehen bleibt

    vor 8 Stunden schrieb john23:

    Ich meine ich hatte das auch mal und da hat nur warten geholfen. Wenn die Hardware alt ist oder der Server stark ausgelastet kommt das wohl häufiger.

    Sicherstellen, dass die Platten nichts anderes besonders belastet.

     

    Das ist wohl eigentlich das Problem... einerseits ist die Performance schuld das es mit dem Mailbox Move nicht so recht voran geht... andererseits müssen die Dinger rüber, weil die Kiste am Anschlag steht.

    Wir haben keine CPU´s oder RAM mehr zum Zuweisen.

     

    Mit Prio auf High gesetzt geht einer nach dem anderen. Hilft wohl nichts außer langsam zu machen und zu warten...

  7. Hallo zusammen,

    ich führe ganz normal folgenden Befehl aus:

    New-MoveRequest -Identity <Emailadresse> -TargetDatabase <Datenbank> -Priority Highest -BadItemLimit 0 -SuspendWhenReadyToComplete

    Das hat bis jetzt immer funktioniert.

    Bei den jetzigen User läuft der Vorgang jedoch nicht los... Die User bleiben bei 0% stehen und der Fehler disk latency time wird ausgegeben. Auch der Versuch jeden User einzeln zu migrieren bleibt stehen.

    Ich werde aus diesem Fehler leider nicht schlau. Nach einigen erneuten Versuchen hoffe ich, dass mir jemand einen Tipp geben kann.

×
×
  • Neu erstellen...