Add-O365User
Add-O365User
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.
パラメーター
-License<O365UserLicense[]>
Specifies an array of licenses for the account.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
true |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-O365AccountUPN<String>
Specifies a user principal name (UPN). The cmdlet creates an account that has the UPN that you specify.
エイリアス |
なし |
必須? |
true |
位置は? |
2 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
System.String,System.String
LocalAccountName
Type: System.String
Description: name of a local user accountO365AccountUPN
Type: System.String
Description: user principal name
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
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>
例
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:\>