Skip to content

Instantly share code, notes, and snippets.

View CCOSTAN's full-sized avatar
🎞️
Working on more YouTube Videos!

Carlo Costanzo CCOSTAN

🎞️
Working on more YouTube Videos!
View GitHub Profile
@CCOSTAN
CCOSTAN / ExportOffice365user.ps1
Created July 22, 2021 15:54 — forked from kcchien/ExportOffice365user.ps1
Powershell commands for export Azure AD and import into local AD
#import office 365 session
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
#connect Azure AD
Connect-MsolService -Credential $UserCredential
#Random password generator
Function random-password ($length = 8)