Add-O365User
Add-O365User
Creates an account and assigns it to a local user account.
Sintaxis
Parameter Set: Default
Add-O365User [-LocalAccountName] <String> [-O365AccountUPN] <String> [-License <O365UserLicense[]> ] [ <CommonParameters>]
Descripción detallada
The Add-O365User cmdlet creates an account and assigns it to a local user account.
Parámetros
-License<O365UserLicense[]>
Specifies an array of licenses for the account.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-LocalAccountName<String>
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.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-O365AccountUPN<String>
Specifies a user principal name (UPN). The cmdlet creates an account that has the UPN that you specify.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
System.String,System.String
LocalAccountName
Type: System.String
Description: name of a local user accountO365AccountUPN
Type: System.String
Description: user principal name
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
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>
Ejemplos
Example 1: Create an office_365_2 account
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:\>