Table of Contents

connessione al tenant

Connect-ExchangeOnline -UserPrincipalName admin@xxx.onmicrosoft.com

import export Role

Import PST on Office365 connettersi in protection.office.com per creare la

PS C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy> .\AzCopy.exe /source:“c:\job\migrazioneexchange\new” /dest:“https://qualcosa.blob.core.windows.net/ingestiondata?sv=2015-04-05&sr=c&si=IngestionSasForAzCopy202102121607300829&sig=UvczIFJiiEmJ4an41URmAxADMJKOQ3cvrdbYVT9t3kk%3D&se=2021-03-19T13%3A43%3A52Z” /V:“c:\Users\ddoro\Desktop\Uploadlog.log” /Y

installazione moduli msonline azuread

da powershell

Install-Module MSOnline
Install-Module AzureAD
Import-Module AzureAD

creazione massiva nuove mailbox

"usr1
usr2".split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries)| foreach{
  $a=get-aduser -identity $_ -Properties mail |select name,mail,samaccountname
  $a.GetType()
  New-Mailbox  -Name $($a.mail) -displayname $($a.name)  -MicrosoftOnlineServicesID $($a.mail) -Password (ConvertTo-SecureString -String Password -AsPlainText -Force)

}

criteri Antimalware

https://security.microsoft.com/threatpolicy Anti Malware

Public Folder Permission on office 365

  1. connect to your tenant with command Connect-ExchangeOnline -UserPrincipalName admin
  2. Verify pemrissions Get-PublicFolderClientPermission “\Folder”
  3. set permissions: Add-PublicFolderClientPermission “\Folder” -AccessRights owner -user user@domain.it

assign o365 license

#mi connetto al tenant 365

$user='XXXXXX' #without domain

#get credential to connect to o365 and connect to msonline and azure AD

$cred=Get-Credential -Credential adm@onmicrosoft.com
Connect-MsolService -Credential $cred
Connect-azureAD -Credential $cred

#get user principal name

$userUPN=(Get-ADUser -Identity $user).userprincipalname

#set location, needed for assign license

Set-MsolUser -UserPrincipalName "$userUPN" -UsageLocation IT

#select microsoft license (E3 in this case)

$planName="SPE_E3"
$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense
$License.SkuId = (Get-AzureADSubscribedSku | Where-Object -Property SkuPartNumber -Value $planName -EQ).SkuID
$LicensesToAssign = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses
$LicensesToAssign.AddLicenses = $License
Set-AzureADUserLicense -ObjectId $userUPN -AssignedLicenses $LicensesToAssign

#then connect to exchange on premise to enable sent to that user from internal

Enable-RemoteMailbox -Identity $user -RemoteRoutingAddress $user@domain.onmicrosoft.com