Skip to main content

Join-LXCOUpdatePolicy

This cmdlet assigns an update-compliance policy to specified resources. Use the ComplianceStatus parameter to determine whether to replace an existing policy assignment with the new policy.

Note
You cannot pipe objects to this cmdlet.

Syntax

Join-LXCOUpdatePolicy [-Connection LXCOConnection]
-ResourceIDs String[]
-PolicyId String
-ComplianceStatus String[]
[CommonParameter]

Join-LXCOUpdatePolicy [-Connection LXCOConnection]
-GroupIDs String[]
-PolicyId String
-ComplianceStatus String[]
[CommonParameter]

Join-LXCOUpdatePolicy [-Connection LXCOConnection]
-ResourceIDs String[]
-PolicyId String
[-Overwrite]
[CommonParameter]

Join-LXCOUpdatePolicy [-Connection LXCOConnection]
-GroupIDs String[]
-PolicyId String
[-Overwrite]
[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.
-GroupIDs String[]
Specifies list of IDs of manager or device groups.
-ResourceIDs String[]
Specifies a list of IDs of resource managers or managed devices.
-PolicyId String
Specifies the date-compliance policy ID.
-ComplianceStatus String[]
Identifies whether to replace the currently assigned policy with the new policy based on the current policy compliance. This can be one or more of the following values, separated by a comma.
  • Compliant. The new policy is assigned only to devices that are compliant with the assigned policy.
  • NotCompliant. The new policy is assigned only to devices that are not compliant with the assigned policy.
  • NoPolicyAssigned. The new policy is assigned only to devices that do not have an assigned policy.
-Overwrite
When specified, if another policy is assigned to that platform, the current assigned policy is replaced with the new policy. This is equivalent with specifying ComplianceStatus with all values.

If not specified, the current assigned policy (if any) is not changed. This is equivalent with ComplianceStatus having NoPolicyAssigned value.

Note
This parameter is deprecated, and it will be removed at a future date. Use ComplianceStatus parameter instead.
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 assigns a policy to a specific resource, replacing the existing policy.

$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$result = Join-LXCOUpdatePolicy -PolicyId 8D735FCEFBCD49118C68169312166C68 `
-ResourceIDs 00632D78DE644E23B712E200FE449787 `
-ComplianceStatus Compliant,NotCompliant

Disconnect-LXCO