Get-EntraBetaObjectSetting
Gets an object setting.
Syntax
GetQuery (Default)
Get-EntraBetaObjectSetting
-TargetType <String>
-TargetObjectId <String>
[-Top <Int32>]
[-All]
[-Property <String[]>]
[<CommonParameters>]
GetById
Get-EntraBetaObjectSetting
-Id <String>
-TargetType <String>
-TargetObjectId <String>
[-All]
[-Property <String[]>]
[<CommonParameters>]
Description
The Get-EntraBetaObjectSetting cmdlet retrieves an object setting from Microsoft Entra ID.
Examples
Example 1: Retrieve object setting from Microsoft Entra ID
Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Sales and Marketing'"
Get-EntraBetaObjectSetting -TargetType 'Groups' -TargetObjectId $group.Id
Id DisplayName TemplateId
-- ----------- ----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa
This command retrieves object setting from Microsoft Entra ID.
-TargetTypeParameter specifies the target type.-TargetObjectIdParameter specifies the ID of the target object.
Example 2: Retrieve a specific object setting from Microsoft Entra ID
Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Sales and Marketing'"
$setting = Get-EntraBetaObjectSetting -TargetType 'Groups' -TargetObjectId $group.Id | Where-Object {$_.displayName -eq 'Group.Unified.Guest'}
Get-EntraBetaObjectSetting -TargetType 'Groups' -TargetObjectId $group.Id -Id $setting.Id
Id DisplayName TemplateId
-- ----------- ----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa
This command retrieves Specific object setting from Microsoft Entra ID.
-TargetTypeParameter specifies the target type.-TargetObjectIdParameter specifies the ID of the target object.-IdParameter specifies the ID of a settings object.
Example 3: Retrieve top one object setting from Microsoft Entra ID
Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Sales and Marketing'"
Get-EntraBetaObjectSetting -TargetType 'Groups' -TargetObjectId $group.Id -Top 1
Id DisplayName TemplateId
-- ----------- ----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa
This command retrieves top one object setting from Microsoft Entra ID. You can use -Limit as an alias for -Top.
-TargetTypeParameter specifies the target type.-TargetObjectIdParameter specifies the ID of the target object.
Example 4: Retrieve all object setting from Microsoft Entra ID
Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Sales and Marketing'"
Get-EntraBetaObjectSetting -TargetType 'Groups' -TargetObjectId $group.Id -All
Id DisplayName TemplateId
-- ----------- ----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa
This command retrieves all records of object setting from Microsoft Entra ID.
-TargetTypeParameter specifies the target type.-TargetObjectIdParameter specifies the ID of the target object.
Parameters
-All
List all pages.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | False |
| 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
Specifies the ID of a settings object.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
GetById
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Property
Specifies properties to be returned.
Parameter properties
| Type: | System.String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Select |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-TargetObjectId
Specifies the ID of the target object.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-TargetType
Specifies the target type.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Top
Specifies the maximum number of records to return.
Parameter properties
| Type: | System.Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Limit |
Parameter sets
GetQuery
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| 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.