Test-User

Checks if a local user account exists.

Syntax

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

Description

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

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Username String

The username of the local account to check

true false

Return Values

System.Boolean.

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.