Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Change Team Admin using XRM.Data.Powershell module?

Posted on by Microsoft Employee

"get-crmrecords -entitylogicalname team" shows the administratorid as the team admin.  I need to alter these via script, but when I do:

set-crmrecord -entitylogicalname team -id <team guid> -fields @{administratorid = "Name"}

I get the following error: 

System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #7537B7EB
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.Xrm.Data.PowerShell\Microsoft.Xrm.Data.Powershell.psm1:758 char:9
+         throw $conn.LastCrmException
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], FaultException`1
    + FullyQualifiedErrorId : System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #7537B7EB


I'm sure I'm missing something here, but what is the preferred methodology of setting the team admin here?  I'd prefer not to do this manually, as we have 40 teams across multiple orgs (5 dev, 5 test, 5 QA, 1 trn, 1 prd) to deal with.

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans