Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Commerce forum / Unable to create "...
Commerce forum

Unable to create "ADFSServerApplicationForRetail" CommandNotFoundException.

Posted on by 261

Need Help..!

I am stuck at point 6, where I need to create "ADFSServerApplicationForRetail".

6) On the ADFS machine currently viewing, run this script in a new PowerShell window using the command .\Create-ADFSServerApplicationForRetail -HostUrl 'ax.d365ffo.onprem.contoso.com', where the HostUrl value can be found in Service Fabric. To find the HostUrl value, navigate to Service Fabric > Application fabric:/AXSF > Details > Aad_AADValidAudience.

--x--

PS C:\scripts> .\Create-ADFSServerApplicationForRetail -HostUrl 'https://ax.dynamics.dax365.com'
New-D365FOAdfsServerApplicationForRetail-HostUrl:$HostUrl : The term
'New-D365FOAdfsServerApplicationForRetail-HostUrl:$HostUrl' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At C:\scripts\Create-ADFSServerApplicationForRetail.ps1:51 char:30
+ ... plication = New-D365FOAdfsServerApplicationForRetail-HostUrl:$HostUrl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-D365FOAdfsS...ostUrl:$HostUrl:String) [], ParentContainsErrorRecord
Exception
+ FullyQualifiedErrorId : CommandNotFoundException

-- x --

Environment Details:
Environment version information
Application release 8.1 (8.1.195.20006)
Platform release Update22 (7.0.5095.41329)
 
I have also tried to run the command on another environment and other than ADFS machine but face the same issue. 

Regards,

Junaid Ahmed

Categories:
  • Verified answer
    Junaid Profile Picture
    Junaid 261 on at
    RE: Unable to create "ADFSServerApplicationForRetail" CommandNotFoundException.

     The issue is in "Create-ADFSServerApplicationForRetail.ps1" line 51 where 'New-D365FOAdfsServerApplicationForRetail-HostUrl:$HostUrl' is incorrect.  I have added a space between ApplicationForRetail and -HostUrl. 

    7607.aadd.png

    Regards,

    Junaid Ahmed

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans