‘Get-CrmSetting’ Is Not Recognized As The Name Of A cmdlet (Outlook App)
Issue
While trying to run the OAuth provider setup in Microsoft Dynamics CRM, to configure the outlook app for Dynamics365 today 11/12/2017. I encountered this frustrating problem spent 4 hours following the instructions and failing before eventually finding a solution:
Configure the OAuth provider for Dynamics Outlook APP
Follow these steps to configure the OAuth provider in Microsoft Dynamics 365.
1.Log on to the Microsoft Dynamics 365 server as an administrator.
2.In a Windows PowerShell console window, run the following script.
$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings
Found on this Microsoft page: https://msdn.microsoft.com/en-us/library/hh699726.aspx#BKMK_WS2012R2
I was getting in the Power Shell:
PS C:\Users\administrator.serverxxx> $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
Get-CrmSetting : The term ‘Get-CrmSetting’ 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 line:1 char:19
+ $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-CrmSetting:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Spent the whole day trying to fix this even missed a team lunch
Solution
Turns out from these instructions found here: https://msdn.microsoft.com/en-us/library/dn531010.aspx
That an additional step is required:
Dynamics 365 server setup
To configure the Dynamics 365 server to enable federated claims, follow these steps.
1.Configure claims settings
2.Log on as administrator on the Dynamics 365 server that hosts the deployment service role and open a Windows PowerShell command window.
3.Add the Dynamics 365Windows PowerShell snap-in (Microsoft.Crm.PowerShell.dll). More information: TechNet: Administer the deployment using Windows PowerShell
Windows PowerShell
Add-PSSnapin Microsoft.Crm.PowerShell
Enter the following Windows PowerShell commands
$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings
Remember step 2:
Add-PSSnapin Microsoft.Crm.PowerShell
If this is not clear reach out and l will be able to help. (achandiwana@hotmail.co.uk)
While trying to run the OAuth provider setup in Microsoft Dynamics CRM, to configure the outlook app for Dynamics365 today 11/12/2017. I encountered this frustrating problem spent 4 hours following the instructions and failing before eventually finding a solution:
Configure the OAuth provider for Dynamics Outlook APP
Follow these steps to configure the OAuth provider in Microsoft Dynamics 365.
1.Log on to the Microsoft Dynamics 365 server as an administrator.
2.In a Windows PowerShell console window, run the following script.
$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings
Found on this Microsoft page: https://msdn.microsoft.com/en-us/library/hh699726.aspx#BKMK_WS2012R2
I was getting in the Power Shell:
PS C:\Users\administrator.serverxxx> $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
Get-CrmSetting : The term ‘Get-CrmSetting’ 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 line:1 char:19
+ $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-CrmSetting:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Spent the whole day trying to fix this even missed a team lunch
Solution
Turns out from these instructions found here: https://msdn.microsoft.com/en-us/library/dn531010.aspx
That an additional step is required:
Dynamics 365 server setup
To configure the Dynamics 365 server to enable federated claims, follow these steps.
1.Configure claims settings
2.Log on as administrator on the Dynamics 365 server that hosts the deployment service role and open a Windows PowerShell command window.
3.Add the Dynamics 365Windows PowerShell snap-in (Microsoft.Crm.PowerShell.dll). More information: TechNet: Administer the deployment using Windows PowerShell
Windows PowerShell
Add-PSSnapin Microsoft.Crm.PowerShell
Enter the following Windows PowerShell commands
$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings
Remember step 2:
Add-PSSnapin Microsoft.Crm.PowerShell
If this is not clear reach out and l will be able to help. (achandiwana@hotmail.co.uk)
Great!
ReplyDeleteThat did the trick for me :-)!