Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Error when trying to use DeployToDynamics365Instance.ps1 to deploy changes to Portal-hosted Event website

(0) ShareShare
ReportReport
Posted on by 420

Hi all, 

Have been having a good look around but can't find a solution to the issue I'm experiencing. 

I'm just trying to achieve some basic styling changes for my Dynamics 365 Marketing Events Website which is hosted on a Portal. 

I believe I've correctly followed all of the steps in the documentation, however when I go to deploy using the provided PowerShell script I am facing the error below:

GetCRMRecordsError.PNG

"Get-CRMRecords : The term 'Get-CrmRecords' is not recognized as the name of a cmdlet, function, script file, or operable program.  

This happens after I enter my credentials and the same error shows for each file it tries to update. 

In the environment.ts file I have entered the apiEndpoint variable as my portal URL taken from the Website Binding record and I have ensured the useRestStack is set false. 

Any help very much appreciated.  I hadn't expected to have to get so involved when I just wanted to update the colour of the register button and add a logo!

Thanks

Alex

  • Suggested answer
    AlexJay Profile Picture
    AlexJay 420 on at
    RE: Error when trying to use DeployToDynamics365Instance.ps1 to deploy changes to Portal-hosted Event website

    Hi Nya,

    Thanks for the further reply.  The article you've linked is actually a different error message and context.

    I have however been able to resolve this issue myself last night.

    On closer inspection of the PowerShell errors I noticed that the PowerShell XRM module was failing to install correctly at the start of the script due to my administrator apparently having enforced constrained language mode in PowerShell.

    Save-error.PNG

    I am unable to set the mode to full language due to a group policy restriction it seems. 

    I repeated the same steps on my personal laptop and was able to complete the end to end steps and re-deploy the customised site back to my portal. 

    Unfortunately I'm now getting another error following deployment which I have just posted on this forum also.  

    Many thanks

    Alex

  • Nya Profile Picture
    Nya 29,058 on at
    RE: Error when trying to use DeployToDynamics365Instance.ps1 to deploy changes to Portal-hosted Event website

    Hi Alex,

    Here is an article which describes the same error message as yours and its solution.

    Get-CrmSetting : The Term 'Get-CrmSetting' Is Not Recognized As The Name Of A Cmdlet - InteractiveWebs (2021)

    Please have a try to see if it solves your problem.

  • AlexJay Profile Picture
    AlexJay 420 on at
    RE: Error when trying to use DeployToDynamics365Instance.ps1 to deploy changes to Portal-hosted Event website

    Hi Nya,

    I downloaded the latest version 1.34.0 (April release).

    Thanks

  • Nya Profile Picture
    Nya 29,058 on at
    RE: Error when trying to use DeployToDynamics365Instance.ps1 to deploy changes to Portal-hosted Event website

    Hi Alex,

    Have you tried to download and install the latest version of the standard event website as the message mentioned?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,971 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans