Register-LXCODevices
This cmdlet directly manage discovered devices on the specified resource manager or performs discovery and management of devices in bulk using a list of IP addresses or fully-qualified domain names (FQDNs).
Before managing a device, the device must have been previously discovered using the Find-LXCODevices cmdlet.
You cannot pipe objects to this cmdlet.
Syntax
Register-LXCODevices [-Connection LXCOConnection]
-ManagerID String
-ResourceIDs String[]
[-ForceManage]
-UserName String
-DeviceType String
-Password SecureString
[-NewPassword SecureString]
[-RecoveryPassword SecureString]
[CommonParameter]
Register-LXCODevices [-Connection LXCOConnection]
-ManagerID String
-ResourceIPs String[]
[-ForceManage]
-UserName String
-Password SecureString>
[-NewPassword SecureString]
[-RecoveryPassword SecureString]
[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.
- -ManagerID String
- Resource manager IDAttentionDevices can be managed by only one resource manager at a time. Management by multiple resource manager is not supported. If a device is managed by one resource manager, and you want to manage it with another resource manager, you must first unmanage the device from the original resource manager, and then manage it with the new resource manager.
- -ResourceIDs String[]
- List of IDs of discovered devices to be managed.AttentionBefore managing a device using the device ID, the device must have been previously discovered using the
Find-LXCODevices cmdlet. - -ResourceIPs String[]
- List of IP addresses or fully-qualified domain names (FQDNs) of devices to be discovered and managed.
- -ForceManage
- If specified, forces management of the device.AttentionUse the force-management option only if you previously attempted to manage the device and management was not successful due to one of the following error conditions.Attention
- If the managing resource manager failed and cannot be recovered.
If the replacement resource manager instance uses the same IP address as the failed resource manager, you can manage the device again using the RECOVERY_ID account and password (if applicable) and the Force management option.
- If the managing resource manager was taken down before the devices were unmanaged.
- If the devices were not unmanaged successfully.
- If the managing resource manager failed and cannot be recovered.
- -UserName String
- User ID to be used to access the devices.
- -DeviceType String
- The type of devices that should be managed. This can be one of the following values.
- Chassis
- Server
- Storage
- -Password SecureString
- Current password to access the devices.
- -NewPassword SecureString
- New password to be used for managed authentication - Chassis and servers only.
- -RecoveryPassword SecureString
- Recovery password to be used for the servers - Chassis and servers only.
- 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
- Lenovo.XClarityOrchestrator.PowerShell.Data.LXCOJobFullData
If the request was accepted the orchestrator server, this cmdlet returns an LXCOJobFullData object that contains the status of the operation that is associated with this request. If available, job logs are added to the root job and subtasks.
- Lenovo.XClarityOrchestrator.PowerShell.Data.RequestStatusMessage
If an error occurred, this cmdlet returns a RequestStatusMessage object that contains information about the reason of the failure.
Examples
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$securePassword = Read-host "Enter BMC password: " -AsSecureString
$devices = Get-LXCODiscoveredDevices -DiscoveredBy "2.19" -DeviceName 'server-name'
$managers = Get-LXCOManagers -ManagerType 'administrator'
$deviceIDs = @()
foreach($dev in $devices)
{
$deviceIDs += $dev.UUID
}
$result = Register-LXCODevices -DeviceType server -UserName USERID -Password $securePassword `
-ManagerID $managers.Id `
-ResourceIDs $deviceIDs
$result
Disconnect-LXCO
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$securePassword = Read-host "Enter BMC password: " -AsSecureString
$managers = Get-LXCOManagers -ManagerType 'administrator'
$devicesIPs = @("192.0.2.25", "192.0.2.26")
$result = Register-LXCODevices --UserName USERID -Password $securePassword `
-ManagerID $managers.Id `
-ResourceIPs $devicesIPs
$result
Disconnect-LXCO