Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Param (
- [string]$displayName = "SVC-Nework-Gateway-Updater",
- [string]$firstName = "Network-Gateway",
- [string]$lastName = "Updater-Account",
- [string]$upn = "svc_network-updater@yourDomain.onmicrosoft.com",
- [string]$password = "MyPassword#12345",
- [string]$usageLocation = "US"
- )
- $oCred = Get-Credential -Message "Enter Admin Credentials for O365..."
- Connect-MsolService -Credential $oCred
- $user = New-MsolUser -DisplayName $displayName `
- -FirstName $firstName `
- -LastName $lastName `
- -UserPrincipalName $upn `
- -UsageLocation $usageLocation `
- -ForceChangePassword:$false `
- -PasswordNeverExpires:$true `
- -Password $password
Add Comment
Please, Sign In to add comment