Monday, 27 May 2019

Unable to remove the service fabric due to there are 2 primary nodes.


Config validation: There should be exactly one NodeType marked as primary. Currently there are Best Practices Analyzer determined evironment has an issue. Please see additional BPA log output RemoveCluster Exception: System.Fabric.FabricValidationException: Cluster Setup cancelled due to analyzer. Inspect details in DeploymentTrace

Friday, 3 May 2019

Error at Publish-ADFSApplicationGroup.ps1 when publish ADFS

Error at Publish-ADFSApplicationGroup.ps1

Failed at step 18. Configure ADFS:

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/setup-deploy-on-premises-pu12#configureadfs

There is only 2 applications have been installed in the Application Group:

Grant-AdfsApplicationPermission : MSIS7628: Scope names should be a valid Scope Description name in AD FS configuration.
At \\dc\Share\InfrastructureScripts-367323\D365FO-OP-ADFSAppliationGrouppsm1: 204 char:5

Solution: 

In ADFS Management
ADFS >> Service >> Scope Descriptions >> Add new
allAtClaims >> OK

Delete Application and publish it again.

Wednesday, 1 May 2019

Error at .\Add-CertToServicePrincipal.ps1 : Update to existing credential with KeyId 'xxx' is not allowed.

Error at .\Add-CertToServicePrincipal.ps1 -CertificateThumprint ...


New-AzureRmADSpCredential : Update to existing credential with KeyId 'xxx' is not allowed.
At \


Solution:

Remove-AzureRmADSpCredential -ServicePrincipalName "00000015-0000-0000-c000-000000000000" -KeyId xxx

Error at Test-D365CFOConfiguration.ps1 on AOS1: Regkeys haven't been added

Error at Test-D365CFOConfiguration.ps1 on AOS1:

Stop-D365FOServies: The following services still need to be stopped/disabled: [WAS], [W3SVC]
At \\dc\Share\InfrastructureScripts-367323\VMs\aos1\Configure-PreReqs.ps1:236 char:2
.
.
.
Register0D365FOStrongName : The following RegKeys haven't been added in order to disable strong name verification: [HKLM:\SOFTWARE\Microsoft\StrongName\Verification\*,a7cf325ee2c8a9ff]


SOLUTION:
.\Configure-PreReqs.ps1 -MSIFilePath \\DC\share\Tools
Then restart the VM >> TestConfiguration again.

Sunday, 24 February 2019

Removing AzureCredential keeps looping

For some reason, you might have more than 1 Credentials.

Error: When you tried to Remove Credential A, system will return an error saying that cannot update the Credential B. Then if you try to remove Credential B, another error says Cannot Remove

Message: Update to existing credential with KeyId 'xxx' is not allowed.



Solution: This script will remove your all current certificates from a particular Service Principal

Remove-AzureRmADSpCredential -ServicePrincipalName "00000015-0000-0000-c000-000000000000"


Thursday, 21 February 2019

Deployment failed due to FinancialReporting Issue

Message: Module FinancialReporting failed
Detail:
System.InvalidOperationException: An error was encountered. Details may be found in the deployment logs at 'C:\ProgramData\Microsoft Dynamics ERP\Management Reporter\Logs' System.ServiceModel.FaultException 1 [Microsoft.Dynamics.Performance.Common.Contract.Reporting.ServiceFault]: (Faul Detail is equal to Microsoft.Dynamics.Performance.Common.Contract.Reporting.ServiceFault). at Microsoft.Dynamics.Performance.Deployment.FinancialReportingDeployer.Program.Main(String[]args) at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, String[] args) at System.AppDomain.ExecuteAssembly(String  assemblyFile, String[] args) at SetupCore.SetupManager.LaunchProcessInAppDomain(String startupExe, String workingDir, StringcurrentFolder, String[] moduleArgs) at SetupCore.Setupmanager.<>c_DisplayClass12_1.<InvokeModules>b__6()
ErrorCode: 0
MemberName: ErrorPrettify
SourceFile E:\Work\131\s\Source\LocalAgentEvents\LocalAgentEventSource.cs 
SourceLineNumber: 79




Solution
Check the FinancialReporting database if there are reports not checked out: 
  
select * from reporting.ControlReport where CheckedOutTo is not null 

If the query returns something then we can run those scripts for FinancialReporting: 
update Reporting.ControlReport 
set CheckedOutTo = null 

update Reporting.ControlRowMaster 
set CheckedOutTo = null 

update Reporting.ControlColumnMaster 
set CheckedOutTo = null 

update Reporting.ControlTreeMaster 
set CheckedOutTo = null 

Thursday, 10 January 2019

Regkeys haven't been added when running Test-D365FOConfiguration.ps1

When we run step 9.3 to deploy an On-Premise environment, sometimes we might face this error
Issue: the Regkeys haven't been added
Solution: simply we just need to run the Powershell script  .\Configure-PreReqs.ps1 -MSIFilePath <\Toolsin order to reinstall the tools for the server
PS Microsoft.PowerShell.Core\FileSystem::\\dc\share\InfrastructureScripts-206403\VMs\aos1> .\Test-D365FOConfiguration.ps1Checking all prerequisites ...
Validating Pre-Reqs for [AOS] in this machine...
All of the expected firewall rule names were found.
Querying Machine for list of currently Installed applications
Found application Microsoft Access Database Engine 2010 Redistributable (>=14.0.7015.1000).
Found application SQL Server Management Studio 2016 SP1 (>=13.0.4001.0).
Found application Update for Visual C++ 2013 and Visual C++ Additional Runtime (>=12.0.40660).
Found application Microsoft ODBC Driver 17.2.for SQL Server (>=17.2.0.1).
Found application Microsoft ODBC Driver 13.1 for SQL Server (>=13.1.4001.0).
Windows feature .NET Framework 3.5 Features is installed
Windows feature .NET Framework 4.6 Features is installed
Windows feature Windows Process Activation Service is installed
Windows feature Internet Information Services is installed

Stop-D365FOServices : The following services still need to be stopped/disabled:
[WAS], [W3SVC]
At \\dc\share\InfrastructureScripts-206403\VMs\aos1\Configure-PreReqs.ps1:236 char:2
+     Stop-D365FOServices -ServiceNames $disabledServiceNames -Test:$Te ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Stop-D365FOServices
Register-D365FOStrongName : The following RegKeys haven't been added in order to disable strong name verification:
[HKLM:\SOFTWARE\Microsoft\StrongName\Verification\*,a7cf325ee2c8a9ff],
[HKLM:\SOFTWARE\Microsoft\StrongName\Verification\*,31bf3856ad364e35],
[HKLM:\SOFTWARE\Microsoft\StrongName\Verification\*,b03f5f7f11d50a3a],
[HKLM:\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,a7cf325ee2c8a9ff],
[HKLM:\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,31bf3856ad364e35],
[HKLM:\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,b03f5f7f11d50a3a]. Run the script again to disable strong name verification.
At \\dc\share\InfrastructureScripts-206403\VMs\aos1\Configure-PreReqs.ps1:239 char:2
+     Register-D365FOStrongName -StrongNameDisabled $strongNameDisabled ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Register-D365FOStrongName
Register-UAC : The following item properties in [HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] are either missing or have incorrect values in order to disable User Access Control :
[EnableLUA], [ConsentPromptBehaviorAdmin], [LocalAccountTokenFilterPolicy]
At \\dc\share\InfrastructureScripts-206403\VMs\aos1\Configure-PreReqs.ps1:242 char:2
+     Register-UAC -IsUACDisabled:$isUACDisabled -RegPath $regPath -UAC ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Register-UAC