Recover Deleted O365 Mailbox data into Shared Mailbox

  1. Connect to Exchange Online
  2. Get-Mailbox -SoftDeletedMailbox | fl name,exchangeguid​
    2. (Get-Mailbox -SoftDeletedMailbox ivan.eltarabishy@alamarfoods.com).ExchangeGuid


3. Create a Shared Mailbox – ivaneltarabishy@alamarfoods.com and get the ExchangeGuid for the shared mailbox
(get-mailbox ivaneltarabishy@alamarfoods.com).ExchangeGuid


4. Now, we will copy the data from the original deleted mailbox to the shared mailbox 

​5. Get-MailboxRestoreRequest for the status of the mailbox copy. 

Switch from Semi-Annual Channel to the Monthly Channel in O365


Consider a scenario where Office 365 ProPlus is installed on a machine from the Semi-Annual Channel.  Now let’s say, a new feature is introduced on the Monthly Channel which you would like to get.  Since you are on the Semi-Annual Channel you will have to wait for a few months before this feature is made available to the Semi-Annual Channel.  But what if you do not want to wait that long?  The answer is, switch to the Monthly Channel.

Some users have the semi-annual channel and others the monthly channel, The Monthly channel users get the latest updates. this could be due to the Office License that is assigned to the user. 
What I observed is that Business Premium users tend to have the “Monthly Channel” whereas the E3 users have the “Semi-Annual Channel” 
These cmd allow the E3 users to be assigned the Monthly channel in E3, that way the updates are synced across, and changes can be seen by new users

Below are the steps to switch channels:

  1. Identify the channel which you would like to switch to. Features and updates by channel are documented here.
  2. Launch Command Prompt as an administrator.
  3. Navigate to “C:\Program Files\Common Files\Microsoft Shared\ClickToRun\”
  4. Run the following command to change the desired channel, let’s say Monthly Channel Targeted “OfficeC2RClient.exe /changesetting Channel=Monthly” 

Note – You can use this command to switch to any channel using the corresponding Channel keyword listed below:

ChannelKeyword in CMD or ODT
  Monthly Channel (Targeted)  Channel=”Insiders“ or Channel=”FirstReleaseCurrent
  Monthly Channel  Channel=”Monthly” or Channel=”Current
  Semi-annual Channel (Targeted)  Channel=”Targeted” or Channel=”FirstReleaseDeferred
  Semi-annual Channel  Channel=”Broad” or Channel=”Deferred

To start the switch Channel process, run “OfficeC2RClient.exe /update user” from the cmd prompt path “C:\Program Files\Common Files\Microsoft Shared\ClickToRun\” 

This should be followed by a series of windows which will take you through the process of downloading and installing updates for the new channel that you have switched to.

PowerShell Commands for a O365 System Admin

Create New O365 User

Connect-MsolService​

New-Msoluser -UserPrincipalName torky.elenazy@alamarfoods.com -DisplayName "Torky ElEnazy" -FirstName Torky -LastName Elenazy -Country SA -MobilePhone +966594399666 -Fax SADP01334 -Department "Human Resources" -Title "Recruiter Assistant" -UsageLocation SA

Adding License to user

Set-MsolUserLicense -AddLicenses AlamarFoods:O365_BUSINESS_PREMIUM -UserPrincipalName mohammed.hemdan@alamarfoods.com

Add Manager Credentials – first connect to Exchange Online

Add Manager – MFA Enabled

Connect to EAC<Hybrid<Exchange Online Powershell with MFA

Connect-EXOPSSession -UserPrincipalName shrenik.salguna@alamarfoods.com

(in Hybrid PowerShell )

Set-User -Identity mohammed.hemdan@alamarfoods.com -Manager mohammed.roustom@alamarfoods.com

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

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

Import-PSSession $Session

Add to Distribution List – (Office365 Groups)

Add-DistributionGroupMember -Identity "Alamar Foods" -Member "kiran.venugopal@alamarfoods.com"

Add-DistributionGroupMember -Identity "Alamar Corporate" -Member "kiran.venugopal@alamarfoods.com"

Add to O365 Group

Add-UnifiedGroupLinks -Identity "Alamar Foods KSA" -LinkType Members -Links kiran.venugopal@alamarfoods.com

Create New User in Active Directory

New-ADUser -Name "Kiran Venugopal" -GivenName "Kiran" -Surname "Venugopal" -SamAccountName "kiran.venugopal" -UserPrincipalName "kiran.venugopal@alamarfoods.com" -Office "Head Office" -EmailAddress "kiran.venugopal@alamarfoods.com" -Mobile "+971551477891" -Title "KSA Financial Analyst" -Department "Finance" -Path "OU=Finance,OU=HO Users,OU=Saudi Arabia-HO,DC=alamarfoods,DC=local" -AccountPassword(Read-Host -AsSecureString "Aa123456") -Company "Alamar Foods | KSA" -City "Riyadh" -Country ‘SA’ -StreetAddress "AlOlaya District, Street No. 36, Building No. 3" -POBox ‘4748’ -Manager "usama.ruby" -Enabled $true

For MENAP Users

New-ADUser -Name "Mohamed Younes" -GivenName "Mohamed" -Surname "Younes" -SamAccountName "mohamed.younes" -UserPrincipalName "mohamed.younes@alamarfoods.com" -Office "Head Office" -EmailAddress "mohamed.younes@alamarfoods.com" -Mobile "+20106644628" -Title "Warehouse Supervisor" -Department "Supply Chain" -Path "OU=Commissary,OU=EG Users,OU=Egypt,OU=MENAP,DC=alamarfoods,DC=local" -AccountPassword(Read-Host -AsSecureString "Aa123456") -Company "Alamar Foods | Egypt" -City "Cairo" -Country ‘EG’ -Manager "mohamed.amer" -Enabled $true

Adding Manager thru CSV command

Create CSV; UserPrincipalName; (see desktop)

Manager

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

Import-PSSession $Session

Add Manager

Set-User -Identity mohammed.hemdan@alamarfoods.com -Manager mohammed.roustom@alamarfoods.com

Import-Csv "C:\Users\shrenik.salguna\Desktop\UpdateManager.csv" | foreach {Set-User -Identity $_.UserPrincipalName -Manager $_.Manager}

Get all properties of user

Get-User | gm

Get properties of user and manager

Get-User | select -Property Name,Manager

Export to CSV

Get-User | select -Property Name,Manager | Export-csv "C:\Users\shrenik.salguna\Desktop\Manager.csv"

"C:\Users\shrenik.salguna\Desktop\UpdateManager.csv" | foreach {Set-User -Identity $_.UserPrincipalName -Manager $_.Manager}