< Back

Get-CUser

Sun Jan 12, 2020 10:00 pm

NAME Get-CUser



SYNOPSIS

Gets *local* users.





SYNTAX

Get-CUser [[-UserName] <String>] [<CommonParameters>]





DESCRIPTION

`Get-CUser` gets all *local* users. Use the `UserName` parameter to get a specific user by its username.



The objects returned by `Get-CUser` are instances of `System.DirectoryServices.AccountManagement.UserPrincipal`.

These objects use external resources, which, if they are disposed of correctly, will cause memory leaks. When

you're done using the objects returne by `Get-CUser`, call `Dispose()` on each one to clean up its external

resources.



`Get-CUser` is new in Carbon 2.0.





PARAMETERS

-UserName <String>

The username for the user.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.DirectoryServices.AccountManagement.UserPrincipal.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CUser



Demonstrates how to get all local users.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-CUser -Username LSkywalker



Demonstrates how to get a specific user.











RELATED LINKS

Install-CUser

Test-CUser

Uninstall-CUser