Skip to content

Simple PS Script to create AzureAD, MS365 user accounts with attributes in bulk

Notifications You must be signed in to change notification settings

danyberlin/AzureAD_AccountCreator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

AzureAD AccountCreator

Simple PS Script to create AzureAD, MS365 user accounts with attributes in bulk by referencing an Excel workbook. The script can read/write the worksheet given as a parameter.

Includes so far following attributes

  • Licenses by SKU name
  • Groups by Email or ObjectID, no SharedMailbox
  • Company, Position, Department, Phone Number
  • Display Name
  • Requires Email Adress for account creation or update
  • Generated First and Lastname based on mandatoty pattern
    eg [email protected]

Requirements

Windows Session by a domain user with either of these roles

  • User Administator
  • Global Administrator

Execute the following commands
Install-Module -Name AzureAD
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

HowTo

  1. Open the script
  2. Make sure the static values match your worksheet's colum
# Display Name E-Mail Licenses Groups Department Position Company Mobile Phone Password Messages
1 Names [email protected] INTUNE_A,ENTERPRISE_A [email protected],some-object-id Mission Control Major Doughe The Goof Ltd. 0123-6666666 <leave empty> <leave empty>
  1. Navigate to the folder where the script is located in PS
  2. Enter name of the script like a command with the following two parameters:
    name of the workbook (absolute path!) name of the worksheet

eg PS C:\Users\d\Desktop>azureConnect.ps1 C:\Users\d\Downloads\someWB.xlxs Sheet1

Good luck!
D

About

Simple PS Script to create AzureAD, MS365 user accounts with attributes in bulk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published