Creates an unlicensed user in Microsoft Online Services.
Syntax
Add-MSOnlineUser [-FaxNumber <string>]
[-StreetAddress <string>] [-OfficePhone <string>]
[-MobilePhone <string>] [-ZipOrPostalCode <string>]
[-CountryOrRegion <String>] [-City <string>]
[-StateOrProvince <string>] -FirstName <string>
-LastName <String> -Identity <String> [-Credential
<PSCredential>] [-Department <string>] [-OfficeNumber
<string>] [-DisplayName <String>] [-JobTitle
<string>]
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
|
City |
No |
System.string |
City of the user to be created. |
|
CountryOrRegion |
No |
System.string |
Country or region of user to be created. |
|
Credential |
No |
System.Management.Automation.PSCredential |
Specific credentials used to access Microsoft Online Services. |
|
Department |
No |
System.string |
Department of the user to be created. |
|
DisplayName |
No |
System.string |
Display name of the user to be created. If not specified, Display Name will be calculated from parameters FirstName and LastName. |
|
FaxNumber |
No |
System.string |
Fax phone number for the user to be created. |
|
FirstName |
Yes |
System.string |
First name of the user to be created. |
|
Identity |
Yes |
System.string |
User Principal Name of the user to be created. |
|
JobTitle |
No |
System.string |
Job title of the user to be created. |
|
LastName |
Yes |
System.string |
Surname of the user to be created. |
|
MobilePhone |
No |
System.string |
Mobile phone number of the user to be created. |
|
OfficeNumber |
No |
System.string |
Office number or location of the user to be created. |
|
OfficePhone |
No |
System.string |
Office phone number of the user to be created. |
|
StateOrProvince |
No |
System.string |
State or province of the user to be created. |
|
StreetAddress |
No |
System.string |
Street address of the user to be created. |
|
ZipOrPostalCode |
No |
System.string |
ZIP or postal code of the user to be created. |
Example
This example creates a user based on properties passed on the command line:
Add-MSOnlineUser –Identity Erik@adatum.com
–FirstName “Erik” –LastName “Ismert”… -Credential
$Cred_object
Comments
None.