Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates an account and assigns it to a local user account.
Parameter Set: Default
Add-O365User [-LocalAccountName] <String> [-O365AccountUPN] <String> [-License <O365UserLicense[]> ] [ <CommonParameters>]
The Add-O365User cmdlet creates an account and assigns it to a local user account.
Specifies an array of licenses for the account.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of a local Active Directory user account. The cmdlet creates an account and assigns it to the local user account that you specify.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
Specifies a user principal name (UPN). The cmdlet creates an account that has the UPN that you specify.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
System.String,System.String
LocalAccountName
Type: System.String
Description: name of a local user accountO365AccountUPN
Type: System.String
Description: user principal name
The output type is the type of the objects that the cmdlet emits.
Microsoft.WindowsServerSolutions.O365Integration.O365User
This cmdlet returns a class that represents an online account.
When output: online account exists
ObjectId Property System.Guid
UserPrincipalName Property System.String
Activated Property System.Boolean
LocalUserName Property System.String
Licenses Property System.Collections.ObjectModel.ReadOnlyCollection<O365UserLicense>
This command creates an account named Admin@Contoso.onmicrosoft.com and assigns it to the local user account named Admin.
PS C:\> Add-O365User -LocalAccountName "Admin" -O365AccountUPN "Admin@Contoso.onmicrosoft.com"
PS C:\>