Set-O365AssignedUser

Set-O365AssignedUser

Assigns an account to a network user account.

Syntax

Parameter Set: Default
Set-O365AssignedUser [-LocalAccountName] <String> [-O365AccountUPN] <String> [ <CommonParameters>]

Detailed Description

The Set-O365AssignedUser cmdlet assigns an account to a network user account.

Parameters

-LocalAccountName<String>

Specifies the name of a local Active Directory user account. The cmdlet assigns the account to the local user account that you specify for the O365AccountUPN parameter.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-O365AccountUPN<String>

Specifies a user principal name (UPN). The cmdlet assigns the account that you specify to the local user account that you specify for the LocalAccountName parameter.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

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).

Inputs

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: local user name

    O365AccountUPN
    Type: System.String
    Description: user principal name

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Assign an Office 365 account to a local user account

This command assigns an account to a local user account named PattiFuller.

PS C:\> Set-O365AssignedUser -LocalAccountName "PattiFuller" -O365AccountUPN "PattiFuller@contoso.onmicrosoft.com"
PS C:\> 

Get-O365AssignedUser

Clear-O365AssignedUser