Connect-ExchangeOnline -UserPrincipalName admin@xxx.onmicrosoft.com
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
"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)
}
https://security.microsoft.com/threatpolicy Anti Malware
#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