ExchangeOnline
7 TopicsGet a report showing specific shared mailboxes and Display Names of their members on one line.
Dear Community, I have been asked to generate an excel report showing all our shared mailboxes starting with "jobs-". For each shared mailbox we want to see the members' Display Names (not the email addresses) sorted in alphabetical order, and these should stay on one line (not in a column). I was able to get the shared mailboxes and the Display Names, but not the "one line" request. Is there anyone who can help me with the code? Many thanks in advance! $jobs = Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited -Filter { DisplayName -like 'jobs-*' } $JobsReport = @() foreach ($job in $jobs) { $Members = Get-MailboxPermission $job.identity | Where-Object { ($_.User -like '*@*') | Sort-Object User foreach ($Member in $Members) { $DisplayName = ((Get-User $Member.User).DisplayName) -join ', ' $JobsReport += [PSCustomObject]@{ SharedMailbox = $job.Alias MemberDN = $DisplayName } } }Solved859Views0likes7CommentsPowershell ResultSize not working
Hello, I wrote a small script but for some reason “ResultSize” doesn’t work. “WARNING: There are more results available than currently displayed. If you want to display all results, increase the value for the ResultSize parameter. “ but this is already on “unlimited” I already tried with digits but won't works. #Connect-ExchangeOnline $DLList = Import-CSV "C:\temp\Liste_DL_UTF8.csv" #$DLList.Liste foreach($Line in $DLList) { #Write-Host $Line.Liste Get-DynamicDistributionGroupMember -ResultSize unlimited -Identity $Line.Liste | Select-Object DisplayName | Export-Csv -Path C:\Temp\DL_Listen_Members\$($Line.Liste)_Members.csv #Write-Host (Get-DynamicDistributionGroupMember -ResultSize unlimited -Identity $Line.Liste).DisplayName } Thanks for every help!Solved24KViews0likes2CommentsLogs of SkippedItem Failure during Migration From GWS Gmail to M365 Exchange Online
Hello, I have recently completed migration from GWS Gmail to M365 Exchange Online utilizing Migration Batch microsoft provided. Some of items, However, were skipped during the migration. With Powershell Command as below, I found 6 failure errors in common. $ustats=Get-MigrationUserStatistics "UPN" -IncludeSkippedItems -IncludeReport -DiagnosticInfo "Verbose" $ustats.Report.BadItems | FT folder,subject,failure Could anyone of you let me know of the reasons behind below SkippedItem Failure Logs? There is no such docs to give me answers for that. 1.ConversionFailedException: The message content has become corrupted. --> Decoding of header Subject failed; raw value: --> Character set name (5601) is invalid or not installed. 2. GoogleEventRecurrenceException: Error occurred while converting iCal recurrence to XSO recurrence. RRULE: 'Start.Date="" . Error : 'Invalid ICAL element: RRULE.InvalidRecurrenceUntil' 3. GoogleEventIgnoredTombstoneInstanceOrphanException: Ignored a tombstone of an instance of a series in which the user does not have access to the entire series. 4. MessageSubmissionExceededException: Cannot save changes made to an item to store. --> MapiExceptionMaxSubmissionExceeded: Unable to save changes. 5. UnsupportedGmailFilterComponentException: Unsupported Gmail filter criteria or action. 6. UnsupportedGmailFilterExpressionException: Unsupported Gmail filter expression. Thank you in advance!Solved1.3KViews0likes2CommentsError 'Index was out of range. Must be non-negative and less than the size of the collection.'
I have version 2.0.6 of module ExchangeOnlineManagement installed and I am using WindowsPowerShell 5.1. I issue the following connect statement inside a script: Connect-ExchangeOnline -AppId <appid> -CertificateThumbprint <cert thumbprint> -Organization <organization> And get the following error: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index At HIDDEN\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.6\netFramework\ExchangeOnlineManagement.psm1:750 char:21 + throw $_.Exception.InnerException; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], ArgumentOutOfRangeException + FullyQualifiedErrorId : Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index When the script finishes running I issue the exact same connect statement and it executes fine. Anyone have any suggestions to get the connect statement to work the first time it's issued?Solved24KViews0likes10CommentsRegarding the different output formats of Powershell Versions 5 and 7.
I use Exchange Online commands through Powershell. I have noticed that Powershell versions 5 and 7 work differently. And I would like to achieve an output format like Powershell version 5, but without using the "|Format-table" notation. Is it possible to rewrite the default values? Thank you. Powershell version information in use: PowerShell 5: 5.1.22000.653 and PowerShell 7: 7.2.5Solved1.1KViews0likes3CommentsExchangeOnline Transport Regeln
Hallo, ich versuche gerade per Powershell eine neue Transportregel anzulegen. Es geht um ExceptIfSubjectOrBodyMatchesPatterns, es soll also geprüft werden, ob im Betreff oder im Mailtext ein bestimmtes Pattern gefunden wird. Konkret soll die Mail darauf geprüft werden, ob ein bestimmter Link enthalten ist und der Mailversand soll dann nicht durchgeführt werden. Ich schaffe es mittlerweile per Powershell neue Regeln anzulegen, diese anzuzeigen und auch wieder zu löschen, aber die richtige Form des Pattern zur Erkennung des Links geht nicht. Vielleicht hat jemand eine Idee, wie das Pattern aussehen muss. Link, der nicht enthalten sein darf: https://meinedomäne.de/erp/.... Vor allem der Teil /erp/ ist immer gleich. Mein Ansatz war bisher: $pattern1 = "((\/)(e|E)(r|R)(p|P)(\/))" New-TransportRule -name "Block-Mail-with-Link" -ExceptIfSubjectOrBodyMatchesPatterns $pattern1 -Priority '0' -Enabled $true -GenerateIncidentReport "Email address removed" Ich lasse mir da nur einen Report generieren, um die Mailversand beim Testen nicht zu stören. Die tatsächliche Blockierung erreiche ich mit: New-TransportRule "Links with Pattern" -ExceptIfSubjectOrBodyMatchesPatterns *Pattern* -RejectMessageReasonText "Im Betreff oder Mailtext wurden Links mir ERP entdeckt" -Enabled $True VGSolved1.2KViews0likes3Comments