Add-O365User
Creates an office_365_2 account and assigns it to a local user account.
Syntax
Add-O365User
[-LocalAccountName] <String>
[-O365AccountUPN] <String>
[-License <O365UserLicense[]>]
[<CommonParameters>]
Description
The Add-O365User cmdlet creates an office_365_1 account and assigns it to a local user account.
Examples
Example 1: Create an office_365_2 accountoffice_365_2
PS C:\> Add-O365User -LocalAccountName "Admin" -O365AccountUPN "Admin@Contoso.onmicrosoft.com"
An Office 365 account was added.
This command creates an office_365_2 account named Admin@Contoso.onmicrosoft.com and assigns it to the local user account named Admin.
1:
PS C:\>
Parameters
-License
Specifies an array of office_365_2 licenses for the account.
Type: | O365UserLicense[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalAccountName
Specifies the name of a local Active Directory user account. The cmdlet creates an office_365_2 account and assigns it to the local user account that you specify.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-O365AccountUPN
Specifies a user principal name (UPN). The cmdlet creates an office_365_2 account that has the UPN that you specify.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
System.String,System.String
LocalAccountName Type: System.String Description: name of a local user account
O365AccountUPN Type: System.String Description: user principal name
Outputs
Microsoft.WindowsServerSolutions.O365Integration.O365User
This cmdlet returns a class that represents an office_365_2 online account. When output: office_365_2 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>
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for