Showing posts with label Office 365 Admin. Show all posts
Showing posts with label Office 365 Admin. Show all posts

Tuesday, April 21, 2020

How to view Msol User Groups in Powershell

Sometimes th administrator needs to know which groups the Office 365 user is member of.
You can use the command Get-MsolUserGroup to resolve this issue.

Installtion
Install-Module -Name Microsoft365.Toolbox

Usage
Import-Module ActiveDirectory.Toolbox

Commands
Get-MsolUserGroup [-UserPrincipalName]





Note:
#Requires -Modules MSOnline

Thursday, April 18, 2019

Manage Office 365 Groups (Unified Group) Email Aliases

When working with Office 365 Groups sometimes we need to change email alias in some reason.
We can change Office 365 Groups email alias via PowerShell.


View Office 365 Group email address

To view Office 365 Group email alias 

via PowerShell use command

[PS]Get-UnifiedGroup -Identity <UnifiedGroupIdParameter> | fl EmailAddresses, PrimarySmtpAddress

or

[PS]Get-UnifiedGroup -Identity <UnifiedGroupIdParameter> | select -ExpandProperty EmailAddresses


Add email alias to Office 365 Group

Use this cmdlet to add email alias for Office 365 group:

[PS]Set-UnifiedGroup -Identity <UnifiedGroupIdParameter> -EmailAddresses @{Add="EmailAddress"}



Tuesday, November 20, 2018

Link Exchange Online Mailbox with Exchange On-premise

One of my customer have a hybrid exchange environment.
For a new user needs to create AD account and Mailbox on Exchange on-premise.
After creating mailbox and if is needed (depends on Company Police), user mailbox moving to the Exchange Online (Office 365).
It is important to be sure that the right routing address is set, user listed in Address Book and all works fine.

In this case some mailboxes was created wrong.
That means, that there was a AD user on-premise and mailbox was created directly in the Exchange Online.
 
 
 
When on-premise user tried to send message to user whose mailbox was created in Exchange Online directly, he got message:
 


Monday, November 19, 2018

Connect to Exchange Online PowerShell

Exchange Online PowerShell allows you to manage your Exchange Online settings from the command line.

1. On your local computer, open Windows PowerShell and run the following command.

$UserCredential = Get-Credential

In the Windows PowerShell Credential Request dialog box, type your account and password, and then click OK.



2. Run the following command.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

3. Run the following command.

Import-PSSession $Session -DisableNameChecking



Wednesday, June 21, 2017

Enable Exchange Online for modern authentication

By default, modern authentication isn't enabled in Exchange Online, but you can enable it.
 
Enable modern authentication in Exchange Online
 
1. Connect to Exchange Online PowerShell.
2. Run the following command in Exchange Online PowerShell:
 
 Set-OrganizationConfig -OAuth2ClientProfileEnabled $true
 
3. To verify that the change was successful, run the following command in Exchange Online PowerShell:
 
Get-OrganizationConfig | Format-Table -Auto Name,OAuth*

Enable Modern Authentication for Microsoft Office 2013

For enable modern authentication for Microsoft Office 2013, you need to set specific registry keys.
 
Note: Modern authentication is already enabled for Office 2016