Guest User

Untitled

a guest
Dec 18th, 2017
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Param (
  2. [string]$displayName = "SVC-Nework-Gateway-Updater",
  3. [string]$firstName = "Network-Gateway",
  4. [string]$lastName = "Updater-Account",
  5. [string]$upn = "svc_network-updater@yourDomain.onmicrosoft.com",
  6. [string]$password = "MyPassword#12345",
  7. [string]$usageLocation = "US"
  8. )
  9.  
  10. $oCred = Get-Credential -Message "Enter Admin Credentials for O365..."
  11. Connect-MsolService -Credential $oCred
  12.  
  13. $user = New-MsolUser -DisplayName $displayName `
  14. -FirstName $firstName `
  15. -LastName $lastName `
  16. -UserPrincipalName $upn `
  17. -UsageLocation $usageLocation `
  18. -ForceChangePassword:$false `
  19. -PasswordNeverExpires:$true `
  20. -Password $password
Add Comment
Please, Sign In to add comment