Test-User

Checks if a local user account exists.

Syntax

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

Description

Uses WMI to check if a local user account exists. Returns True if the local account exists, or False if it doesn't.

Parameters

Name Type Description Required? Pipeline Input Default Value
Username String The username of the local account to check true false

EXAMPLE 1

Test-User -Username HSolo

Checks if the HSolo local account exists. Returns True if it does, False if it doesn't or its encased in carbonite.