Remove-O365User

Remove-O365User

Removes an account that is assigned to a local user account.

Syntax

Parameter Set: Default
Remove-O365User [-LocalAccountName] <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-O365User cmdlet removes a account that is assigned to a local user account.

Parameters

-LocalAccountName<String>

Specifies the name of a local Active Directory user account. The cmdlet removes the account that is assigned to the local user account that you specify.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

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.

Examples

Example 1: Remove an office_365_2 account

This command removes the account that is assigned to the local user account named PattiFuller.

PS C:\> Remove-O365User -LocalAccountName "PattiFuller"
PS C:\> 

Get-O365User

Add-O365User

Enable-O365User

Disable-O365User