Last active
February 15, 2025 17:34
-
-
Save rezanid/ba6ab22dfff709e9392485a45f7f4271 to your computer and use it in GitHub Desktop.
Power Platform Bulk Delete using PSDataverse and Web API filter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Connect-Dataverse -Url https://something.crm.dynamics.com | |
| do { $result = Send-DataverseOperation "ordercloses?`$select=activityid" | | |
| Select-Object -ExpandProperty Content | | |
| ConvertFrom-Json | | |
| Select-Object -ExpandProperty value | | |
| ForEach-Object { [pscustomobject]@{ "Method"="DELETE"; "Uri"="ordercloses($($_.activityid))" } | ConvertTo-Json } | | |
| Send-DataverseOperation -BatchSize 200 -MaxDop 50 -ErrorVariable ErrOperation -OutputTable | |
| } while ( $result ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment