Jump to content

Get Sharedmailboxes with and without Manager


Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Empfohlene Beiträge

Geschrieben (bearbeitet)

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?

bearbeitet von Ysuran
Betreff falsch
Geschrieben

$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

Geschrieben
vor 42 Minuten schrieb mikro:

Mit was für Rechten führst du deinen Befehl in der Exchange Shell aus?

 

 

Als Admin. Die Fehlermeldung oben ist aus einem Editor, deswegen scheiterts an den Rechten.

In der Exchange Shell passiert einfach nichts. Ich bekomme keine Ausgabe.

Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto haben, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen. Es ist einfach!

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...