Get-CMOrchestrationGroup
Get an orchestration group object.
Syntax
Get-CMOrchestrationGroup
[[-Name] <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Get-CMOrchestrationGroup
[-Id] <Int32>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Description
Use this cmdlet to get an orchestration group object by name or ID. You can use this object to start, remove, or configure the orchestration group. For these other actions, use the following cmdlets:
Use orchestration groups to better control the deployment of software updates to devices. You may need to carefully manage updates for specific workloads, or automate behaviors in between. For more information, see About orchestration groups in Configuration Manager.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1: View details about members of an orchestration group
This example first uses the Get-CMOrchestrationGroup cmdlet to get an object for the orchestration group named IT servers.
It then loops through each member of the orchestration group, which is stored by its resource ID. It then uses the Get-CMDevice cmdlet to display the device name and OS build properties.
$og = Get-CMOrchestrationGroup -Name "IT servers"
foreach ( $member in $og.MOGMembers ) {
Get-CMDevice -Id $member -Fast | Select-Object Name, Build
}
Example 2: Get orchestration groups with unapproved scripts
The following example gets all orchestration groups from the site. It uses the built-in Where-Object cmdlet to filter the results that have either of the script approval state properties with a value of 0
. It uses the pipeline operator again to reduce the returned properties with the built-in Select-Object cmdlet to only display the name of the orchestration groups.
You can use this example to display all orchestration groups that have either a pre- or post-script that's not approved.
Get-CMOrchestrationGroup | Where-Object ( $_.PostScriptApprovalState -eq $false -or $_.PreScriptApprovalState -eq $false ) | Select-Object Name
Parameters
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Specify the ID of orchestration group to get. This value is the MOGID property, which is an integer. For example, 16777217
.
Type: | Int32 |
Aliases: | MOGID |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specify the name of the orchestration group to get.
Type: | String |
Aliases: | OrchestrationGroupName |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
IResultObject
Notes
This cmdlet returns an object for the SMS_MachineOrchestrationGroup WMI class.