Posts

Microsoft Exchange: Mailboxes forwarding to Specific Mailbox

 The following will list all mailboxes on your tenant that are forwarding to the specified recipient. $RecipientCN = (get-recipient johndoe).Identity Get-Mailbox -ResultSize Unlimited -Filter {ForwardingAddress - ne $null} | Where-Object {$_.ForwardingAddress -eq $RecipientCN} Huge thanks to Grant for answering pr0digy's question over on Stack Overflow

Get a User's Active Directory Groups

Problem: You need to list out a User's AD Groups quickly and in a way you can copy and paste them. Solution: So we can use the Get-ADUser cmlet with the "Properties" parameter specifying "Member Of" to get a list of AD Groups. The issue is the groups are formatted as distinguished names which are not very easy to read. PS C:\Users\jheisler> (Get-ADUser -Identity "jheisler" -Properties "MemberOf").MemberOf CN=ITTeam,OU=O365,DC=johnjheisler,DC=com CN=ACL-ITDevOps,OU=Security Groups,OU=Groups,DC=johnjheisler,DC=com Thankfully, All we need to do to overcome this is pipe the Get-ADUser cmdlet into a Get-ADGroup cmdlet. Then we can specify the "Name" property off the AD Group objects. PS C:\Users\jheisler> ((Get-ADUser -Identity "jheisler" -Properties "MemberOf").memberof | Get-ADGroup).Name ITTeam ACL_ITDevOps That's it. A quick and clean way to list a user's AD Groups. https://github.com/Snowstuff123/Po...

Hybrid Exchange: Mailbox in cloud, but not On-Prem

 In an Exchange Hybrid Environment, you can run into an issue where an On-Prem AD account is assigned an o365 license and  creates a Cloud mailbox before its migrated. This will leave you in a situation where there is a mailbox in the cloud and no mailbox On-Prem. Fixing this is very easy: All you need to do is run this command in your On-Prem instance Enable-RemoteMailbox "user identity" -RemoteRoutingAddress "user@contoso.mail.onmicrosoft.com" That's It! Told you it was easy. Reference:  How to recover when a mailbox exists in both Exchange Online and on-premises - Exchange | Microsoft Learn

Give a User 'SendAs' permssions to a Mail-Enabled AD Group in Exchange Online

Image
Really specific situation I know, but this took me an embarrassing amount of time to figure out. Thankfully, its pretty simple. Just use the 'RecipientPermission' cmdlets: Add-RecipientPermission -Identity GROUP -Trustee USERNAME -AccessRights SendAs Where GROUP is the 'samAccountName' or 'Primary Email' of the group you want to allow the user to send as and USERNAME is the 'samAccountName' of the user. You can also use the following to see who already has 'Send As' permissions for the group Get-RecipientPermission -Identity GROUP Example:

Outlook Running Slow due to a Maxed out OST?

 Sometimes we get issues where people have a few shared mailboxes in the department and it causes Outlook to run Really  slow when the user opens the application due to the OST's 50gb limit (It starts running like crap at 40gb but gets worse the bigger it gets). Since our users have access to the Outlook Web Application, the fix is to re-add the mailbox permission with "Auto Mapping" turned off. and then use the OWA. Connect-ExchangeOnline #-UserPrincipalName (Get-ADUser $env:USERNAME).UserPrincipalName $UserWhosMailboxIsHavingIssues = '' ##-- The email address of the user who's OST is full $MailboxThatIsMappedToUser = '' ##-- The email of the mailbox that user has full control of Remove-MailboxPermission -Identity $MailboxThatIsMappedToUser -User $UserWhosMailboxIsHavingIssues -AccessRights FullAccess Add-MailboxPermission -Identity $MailboxThatIsMappedToUser -User $UserWhosMailboxIsHavingIssues -AccessRights FullAccess -AutoMapping $false Then we jus...

Useful AI tools for School and Workplace productivity

ChatGPT ( https://chat.openai.com/chat ) Obviously Chat GPT is on here. From helping you write computer code to suggesting recipes based on a given list of ingredients, ChatGPT can do A LOT. Get creative with this one. Bard by Google ( https://bard.google.com/ ) Haven't gotten to play with this very much, but it seems similar to ChatGPT. Will update when I get to use it more. Perplexity.ai ( https://www.perplexity.ai/ ) Uses articles to answer questions. Think of it like a cross between Siri, Wikipedia, and Google search. It also lists its sources too. Great for researching a plethora of topics. Google's Talk to Books ( https://books.google.com/talktobooks/ ) Yet another tool Google offers and tells no one about. This one crawls books for the response to a prompt. Another tool that's great for researching topics. Virtual Face ( https://virtualface.app/#/ ) For ~ $10 you upload 15 photos of yourself, and the AI will generate an entire professional looking photoshoot of heads...

Create Profiles for Managing Microsoft Exchange using Windows Terminal (Online and On-Prem)

Image
I use Windows Terminal a lot and I wanted to show off how I setup Exchange Management profiles to make my life easier. Enjoy! Exchange Online: In Windows Terminal, go to "Settings" and click "Add a new profile" at the bottom. Give it a name you like, and in the "Command line" field, Paste the following: powershell.exe -NoExit -Command "Import-Module ExchangeOnlineManagement; Connect-ExchangeOnline -UserPrincipalName user@contoso.com"  Make sure to replace the UserPrincipalName property with your own. On-Prem Exchange: In Windows Terminal, go to "Settings" and click "Add a new profile" at the bottom. Give it a name you like, and in the "Command line" field, Paste the following: powershell.exe -NoExit -Command "$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://exchange.domain.com/powershell/; Import-PSSession $Session -DisableNameChecking"  Make sure to replace the Connecti...