Skip to main content

Remove-LXCODevices

This cmdlet unmanages devices.

Note
You cannot pipe objects to this cmdlet.

Syntax

Remove-LXCODevices [-Connection LXCOConnection]
[-Force]
-ResourceIDs String[]
[CommonParameter]

Parameters

-Connection LXCOConnection
Specifies the connection to the Lenovo XClarity Orchestrator server. If no connection is specified, the result from the last Connect-LXCO cmdlet is used.
-Force

Indicates whether to force the unmanagement operation. This can be one of the following values:

  • true. Force unmanagment even if the device is not reachable.

  • false. (default) Do not force unmanagement.

-ResourceIDs String[]
List of IDs of devices to be unmanaged, separated by a comma.
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

Examples

The following example unmanages specified devices.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$devices = Get-LXCODevices

$ids = @()
foreach($device in $devices)
{
$ids += $device.Id
}

#unmanage all devices.
$result = Remove-LXCODevices -ResourceIDs $ids -Force
$result

Disconnect-LXCO