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…
LogParser – Find Users that made a successful connection to Exchange On-Premises in the last 7 days
Scenario: Using your IISLogs, you want to pull together a list of successfully authenticated users that will provide a count of their authentication attempts for each Exchange Protocol/Virtual Directory. We will achieve this via PowerShell and LogParser. Solution:
PowerShell: Automatically load scripts or functions when starting PowerShell
Scenario: You want to kick off certain scripts or functions when opening PowerShell Solution:1. Navigate to: C:\Users\<you>\Documents\WindowsPowerShell\ 2. Create a .ps1 script in this directory called: profile.ps1 3. Inside the profile.ps1, add the following command(s) to call and run in your .ps1 scripts. Obviously, change the script name. I have multiple scripts that contain Authenticate.ps1…
Loading…
Something went wrong. Please refresh the page and/or try again.
Follow My Blog
Get new content delivered directly to your inbox.