I've done a bit of research but am having trouble finding any definitive answer on the topic. So I'm here to see if anyone has any experience with getting data out of CRM using PowerShell. I am semi-proficient with Shell so I can make sense of most things. With that said, please don't think I'm here just to be spoon-fed, a nudge in the right direction is what I need.
I am aware there is modules that make this possible (possibly?), and things like XRM toolkit, but a rock-solid answer has been extremely difficult to find.
What I need to do is pull a list of things like "contacts" , "addresses" etc, basically just account details for people stored in the system. It sounds super simple, and doing this is AD, AAD, Exchange is easily done.... but this CRM Dynamics is escaping me.
Thinking of starting off like this:
Import-Module Microsoft.Xrm.Data.Powershell
$conn = Get-CrmConnection -InteractiveMode
$result = Get-CrmRecordsByFetch @"
Then possibly use a Fetch Query? And wrap it up like this:
$result.CrmRecords | Select -Property lastname, firstname, AccountID, Address | Export-Csv -
Encoding UTF8 -Path C:\export.csv -Delimiter ";"
Unfortunately, when it comes to the CRM cmdlets and commands, that's where my knowledge stops.
Any help would be greatly appreciated.