Random 0365 commands.

Random 0365 commands.

https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/

connect to Exchange online PS.
https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx

enable-remotemailbox
https://technet.microsoft.com/en-us/library/ff607313(v=exchg.160).aspx

new-msoluser
https://docs.microsoft.com/en-us/powershell/module/msonline/new-msoluser?view=azureadps-1.0

create user mailboxes in Exchange online
https://technet.microsoft.com/en-us/library/jj907304(v=exchg.150).aspx

connect to exchange servers using powershell.
https://technet.microsoft.com/en-us/library/dd335083(v=exchg.160).aspx

Azure AD Connect Sync Scheduler
https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnectsync-feature-scheduler

Azure atributes to sync
https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnectsync-attributes-synchronized


Bittitan how to sync AD objects to o365
https://community.bittitan.com/kb/Pages/How%20do%20I%20synchronize%20my%20Active%20Directory%20objects%20to%20Office%20365.aspx


Set msexchmailboxguid to NULL.
https://community.bittitan.com/kb/Pages/How%20can%20I%20set%20msExchangeGUID%20attribute%20to%20null.aspx

Fixing Email address policy that dont get assigned.

https://support.microsoft.com/en-us/help/2836370/email-addresses-aren-t-assigned-correctly-to-new-office-365-mailboxes-that-you-create-in-the-exchange-admin-center



Download msonline module for azure.


$UserCredential = Get-Credential
$UserCredential2 = Get-Credential
$UserCredential3 = Get-Credential
get

enable-remotemailbox "dctest2" -RemoteRoutingAddress "TEST2@s.onmicrosoft.com"

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



# conneect to hybrid server for enable mailbox.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://EXCHSERVER001/PowerShell/ -Authentication Kerberos -Credential $UserCredential2
Import-PSSession $Session

Enable-RemoteMailbox TEST3 -RemoteRoutingAddress test3@tenant4.onmicrosoft.com

get
Set-MailboxRegionalConfiguration -identity "TEST2" -Language en-AU
Set-RemoteMailbox -identity CTEST5" -EmailAddresses "TEST5@contoso.com.au"







#  azure online credentials needed

$UserCredential3 = Get-Credential
 Connect-MsolService -Credential

set-msoluser -UserPrincipalName "test5@s.onmicrosoft.com" -UsageLocation AU

Set-MsolUserLicense -UserPrincipalName test5@4.onmicrosoft.com -AddLicenses tenant4:ENTERPRISEPACK

Comments

Popular Posts