-
Notifications
You must be signed in to change notification settings - Fork 0
Get PpeOdata
Query an OData entity from a Power Platform / Dataverse environment.
Get-PpeOdata -EnvironmentId <String> -Entity <String> [-ODataQuery <String>] [-AsExcelOutput]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-PpeOdata -EnvironmentId <String> -Entity <String> [-ODataQuery <String>] [-TraverseNextLink]
[-ThrottleSeed <Int32>] [-AsExcelOutput] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Invokes a GET request against the Dataverse Web API OData endpoint for the specified entity, handling authentication, optional query filters, and automatic pagination via nextLink traversal.
Includes built-in retry logic for 429 (Too Many Requests) responses.
Get-PpeOdata -EnvironmentId "ContosoEnv" -Entity "accounts"
This command retrieves all records from the accounts entity in the environment "ContosoEnv".
Get-PpeOdata -EnvironmentId "ContosoEnv" -Entity "systemusers" -ODataQuery "`$filter=isdisabled eq false&`$select=fullname,systemuserid"
This command retrieves all enabled system users, returning only the fullname and systemuserid fields.
Get-PpeOdata -EnvironmentId "ContosoEnv" -Entity "accounts" -TraverseNextLink
This command retrieves all records from the accounts entity, following pagination links until all pages are returned.
Get-PpeOdata -EnvironmentId "ContosoEnv" -Entity "accounts" -TraverseNextLink -ThrottleSeed 3
This command retrieves all pages from the accounts entity, pausing between 1 and 3 seconds between each page request to reduce the risk of throttling.
Get-PpeOdata -EnvironmentId "ContosoEnv" -Entity "accounts" -AsExcelOutput
This command retrieves all records from the accounts entity in the environment "ContosoEnv" and exports the results to an Excel file.
The ID of the environment to query.
Can be either the environment name or the environment GUID (PPAC).
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe OData entity (plural name) to query, e.g. "accounts" or "systemusers".
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn optional OData query string to append to the request, e.g. "`$filter=statecode eq 0&`$select=name,accountid".
Do not include the leading "?".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseInstructs the cmdlet to follow "@odata.nextLink" pagination and accumulate all pages into the result.
Must be used together with the NextLink parameter set.
Type: SwitchParameter
Parameter Sets: NextLink
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseWhen specified, introduces a random delay between 1 and ThrottleSeed seconds after each page request to reduce throttling risk.
Only valid when TraverseNextLink is also specified.
Type: Int32
Parameter Sets: NextLink
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalseInstructs the cmdlet to export the retrieved records to an Excel file.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Mötz Jensen (@Splaxi)