Search-UnifiedAuditLog
Scenario: The search-MailboxAuditLog command has been deprecated and is no longer producing results. It is now replaced with the search-unifiedAuditLog which pulls in lots of data from various sources, not just Exchange. I need a simple command to search a mailbox for activity and have it display results similar to before. Commands:
Determine SafeAttachment Scan Time for an Email — Because its taking too long…
Scenario: We needed to create a way to identify how long it takes for an attachment to be scanned due to recent complaints. We need to produce a report that shows Message Delivery and Attachment Reinserting post delivery. We have two SafeAttachment policies; a Block Policy with specific users in the SentTo and a different…
Using Graph for PowerShell, move email messages from one folder to another
Scenario: Lets say you accidentally deleted the messages from your Inbox, and now they are mixed in with your Deleted Items. Here are a couple Graph commands you run via PowerShell to move data back to your Inbox without doing it via the email client. Resolution:
Testing the ‘New Outlook’ client
Scenario: Below are my notes for testing the ‘New Outlook’ client within your Microsoft 365 version of Outlook. More to come soon. As of 2/12/2024: Client Protocol: ’New Outlook’ uses OWA. MAPI is the client protocol used in the ‘Old Outlook’ versions (Microsoft 365, 2019, 2016). Search: I can easily search the Primary and Archive mailbox from a single…
Using Graph to Cleanup Mailbox Folders
Scenario: You (or someone) have many mailbox folders that must be deleted via logic. Yeah, you have been storing mailbox folders over the years….. It’s out of hand, but no shame to you. Hence the reason why I am writing this post. Solution: Graph to the rescue! I use the following commandlets to help me out. Requirement: You need to be able…
PowerShell + Logparser to extract successful authentication attempts for Exchange Protocols
Scenario: You want to use LogParser via PowerShell to extract the usernames for all successful authentication attempts to Exchange On-Premises. Scriptlet:
Example of pulling a list of all Scheduled Tasks via PowerShell
Scenario: I have a bunch of scripts that run via Scheduled Tasks. I need to identify what account the scripts are executing under AND what script is running. My 2 goals are: 1. Identify the security account used to run the script. I will then manually replace the older account with my newer account. 2.…
Error: “Install-Package : Unable to find repository. Use Get-PSRepository to see all available repositories”
Scenario: We just discovered that our Exchange Online Mangement tools were no longer connecting. When we would run connect-exchangeonline we would receive an error message stating something similar to: ResourceUnavailable: (:) [New-ExoPSSession] After investigation, we saw that the ExchangeOnlineManagment module was an older module, so we decided to try to update the module. When we…
Mail Flow Error: 450 4.4.317 MSG=UntrustedRoot
Scenario: Messages are getting deferred in Exchange Online when trying to send to our newly added Hybrid Exchange On-Premises servers. When investigating, we receive UntrustedRoot in the details of the connection error. Cause/Solution: Although the new Hybrid Exchange On-Premises servers have the correct Exchange Certificate installed, we still needed to add the TLSCertificateName AND the…
PowerShell: Remove a single value from an Array property where it exists for multiple datasets
Scenario: You are running a get-mailbox command and you want to remove a specific array value for reporting purposes, in our case it was a InPlaceHolds value, from any mailbox where this value exists. Example: We want to remove this Hold GUID from the report for visibility to not confuse folks when they see it…
Something went wrong. Please refresh the page and/or try again.
Follow My Blog
Get new content delivered directly to your inbox.