Editar

Compartilhar via


pac env

Work with your Dataverse organization.

Note

With pac cli version 1.32, the pac org command was changed to pac env. org will continue to work, but we recommend using env going forward.

Commands

Command Description
pac env fetch Performs FetchXML query against Dataverse
pac env list Lists all of the Dataverse organizations the user has access to
pac env list-settings List environment settings
pac env select Select default organization for current authentication profile.
pac env update-settings Update environment settings
pac env who Displays information about the current Dataverse organization.

pac env fetch

Performs FetchXML query against Dataverse

Optional Parameters for env fetch

--environment -env

Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.

--xml -x

FetchXML query to run

--xmlFile -xf

File with FetchXML query to run

pac env list

Lists all of the Dataverse organizations the user has access to

Example

pac env list --filter myenv

The filter parameter is a regular expression based filter.

Optional Parameters for env list

--filter -f

Show only environments containing filter criteria.

pac env list-settings

List environment settings

Example

C:\Users\you>pac env list-settings --filter number
Connected as you@yourorg.com
Setting                              Value
currentbulkoperationnumber           1,000
currentcampaignnumber                1,000
currentcasenumber                    1
currentcategorynumber                1,000
currentcontractnumber                1,000
currentimportsequencenumber          1
currentinvoicenumber                 1,000
currentkanumber                      1,000
currentkbnumber                      1,000
currentordernumber                   1,000
currentparsedtablenumber             1
currentquotenumber                   1,000
maximumtrackingnumber                999
nexttrackingnumber                   0
numberformat                         us
numbergroupformat                    3
numberseparator                      ,
recurrencedefaultnumberofoccurrences 10
showweeknumber                       No
timezoneruleversionnumber            0
versionnumber                        19,810,412

Optional Parameters for env list-settings

--environment -env

Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.

--filter -f

Show only settings containing filter criteria

Remarks

Each environment has an Organization table with a single row that stores settings for the environment.

Unless you apply the --filter parameter, this command returns all the columns from the first and only row of the organization entity type.

Use the pac env update-settings command to change the values for some of these settings.

Learn more about reading and updating environment settings

pac env select

Select default organization for current authentication profile.

Examples

The following examples show the use of the pac env select command.

Select env by using environment URL

This example shows how to select an env by using an environment URL.

pac env select --environment "https://contosotest.crm.dynamics.com"

Select env by using environment ID

This example shows how to select an env by using an environment ID.

pac env select --environment 00000000-0000-0000-0000-000000000000

Optional Parameters for env select

--environment -env

Default environment (ID, url, unique name, or partial name).

pac env update-settings

Update environment settings

Required Parameters for env update-settings

--name -n

Name of the setting to update

Optional Parameters for env update-settings

--environment -env

Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.

--value -v

Value to which setting should be updated to

Remarks

The pac env list-settings command returns all the columns from the first and only row of the organization entity type. Use pac env update-settings to change those settings.

Learn more about reading and updating environment settings

pac env who

Displays information about the current Dataverse organization.

Optional Parameters for env who

--environment -env

Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.

--json

Returns the output of the command as a JSON formatted string.

See also

Microsoft Power Platform CLI Command Groups
Microsoft Power Platform CLI overview