Get-User

Gets local users.

Syntax

Get-User [[-Username] <String>] [<CommonParameters>]

Description

Gets all local users or a specific user by its username.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Username String The username for the user. false false

Return Values

System.DirectoryServices.AccountManagement.UserPrincipal.

EXAMPLE 1

Get-User

Demonstrates how to get all local users.

EXAMPLE 2

Get-User -Username LSkywalker

Demonstrates how to get a specific user.