Get-O365User

Get-O365User

Gets an account.

Syntax

Parameter Set: Default
Get-O365User [-O365AccountUPN] <String> [ <CommonParameters>]

Detailed Description

The Get-O365User cmdlet gets an account.

Parameters

-O365AccountUPN<String>

Specifies a user principal name (UPN). The cmdlet gets the user 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

<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

    LocalAccountName
    Type: System.String
    Description: local user name

Outputs

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>

Examples

Example 1: Get an office_365_2 account

This command gets the account that has the UPN PattiFuller@contoso.onmicrosoft.com.

PS C:\> Get-O365User -O365AccountUPN "PattiFuller@contoso.onmicrosoft.com"
PS C:\> 

Add-O365User

Enable-O365User

Disable-O365User

Remove-O365User