Skip to content
This repository was archived by the owner on Jan 29, 2022. It is now read-only.

Latest commit

 

History

History
154 lines (109 loc) · 3.56 KB

Get-CrmOptionSet.md

File metadata and controls

154 lines (109 loc) · 3.56 KB
external help file Module Name online version schema
AMSoftware.Crm.PowerShell.Commands.dll-Help.xml
AMSoftware.Crm
2.0.0

Get-CrmOptionSet

SYNOPSIS

Get the metadata of a global optionset.

SYNTAX

GetOptionSetByFilter (Default)

Get-CrmOptionSet [[-Name] <String>] [-Exclude <String>] [-CustomOnly] [-ExcludeManaged] [<CommonParameters>]

GetOptionSetById

Get-CrmOptionSet [-Id] <Guid[]> [<CommonParameters>]

DESCRIPTION

Get the metadata of a global optionset. For attribute specific optionsets use Get-CrmAttribute.

EXAMPLES

Example 1

PS C:\> Get-CrmOptionSet | Select Name -ExpandProperty Options | Select Name, Label, Value

Get all global optionsets with the labels and values of the options.

PARAMETERS

-CustomOnly

Retrieve only the metadata for optionsets that are marked as custom.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: GetOptionSetByFilter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclude

Exclude the metadata for optionsets whose Name matches the provided pattern.

Type: System.String
Parameter Sets: GetOptionSetByFilter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ExcludeManaged

Do not retrieve metadata for optionsets that are marked as managed.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: GetOptionSetByFilter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

The MetadataId of the optionset to retrieve.

Type: System.Guid[]
Parameter Sets: GetOptionSetById
Aliases: MetadataId

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

The Name of the optionset to retrieve the metadata for.

NOTE: This parameter is case sensitive. i.e. it must match the case of the Name exactly.

Type: System.String
Parameter Sets: GetOptionSetByFilter
Aliases: Include

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Guid[]

OUTPUTS

Microsoft.Xrm.Sdk.Metadata.OptionSetMetadataBase

NOTES

The Name parameter is case sensitive. i.e. it must match the case of the LogicalName exactly.

RELATED LINKS

Get-CrmEntity

Get-CrmAttribute

Get-CrmEntityKey

Get-CrmRelationship

New-CrmOptionSet

New-CrmOptionSetValue

Set-CrmOptionSet

Set-CrmOptionSetValue

Remove-CrmOptionSet

Remove-CrmOptionSetValue

OptionSetMetadata Class

BooleanOptionSetMetadata Class