Remove-LXCAUserAccount

This cmdlet removes an existing user account from the Lenovo XClarity Administrator server.

Note: You can pipe a UserAccount object to this cmdlet.

Syntax

Remove-LXCAUserAccount [-Connection LXCAConnection]
                        -UserAccount UserAccount
                       [-Force]
                       [CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-UserAccount UserAccount
Specifies the user account to be deleted.
-Force
When specified, removes the user account without first prompting for confirmation about the removal.
CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

This cmdlet removes the user account form the authentication server. No objects are returned.

Examples

The following example removes the testuser user account.

$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred

$account = Get-LXCAUserAccount | where { $_.UserName -eq "testuser" }
Remove-LXCAUserAccount -UserAccount $account -Force

Disconnect-LXCA

Related links