Get-CMOrchestrationGroup
Get an orchestration group object.
Syntax
ByName (Default)
Get-CMOrchestrationGroup
[[-Name] <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
ById
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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
Specify the ID of orchestration group to get. This value is the MOGID property, which is an integer. For example, 16777217
.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | MOGID |
Parameter sets
ById
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specify the name of the orchestration group to get.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | OrchestrationGroupName |
Parameter sets
ByName
Position: | 0 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
IResultObject
Notes
This cmdlet returns an object for the SMS_MachineOrchestrationGroup WMI class.