Skip to content

Instantly share code, notes, and snippets.

@nervouswiggles
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nervouswiggles/70c647e290415c0d12ce to your computer and use it in GitHub Desktop.
Save nervouswiggles/70c647e290415c0d12ce to your computer and use it in GitHub Desktop.
--
Set-ExecutionPolicy RemoteSigned -Force
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Get-PSSession
Import-PSSession $Session -AllowClobber | Out-Null
Import-Module MSOnline
connect-msolservice -credential $LiveCred
Get-MsolUser -All | measure
New-MsolUser -UserPrincipalName danielredfern2@technicalconfessions.onmicrosoft.com -DisplayName "David Redfern" -FirstName "David" -LastName "Redfern"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment