Lesson learned playing with DSC and SharePoint
Published May 15 2019 03:13 PM 436 Views

First published on TECHNET on Jul 10, 2017
Hello All,

It has been a while since i last wrote you, and for that i apologize but these days i am playing with Desired State Configuration and installing SharePoint with it.

My customer asked me to set it up so that we could configure SSRS with SharePoint 2016, and the first step i was tackling was getting the add-in installed on the server, so I setup my config file using the Package resource (See this article for more info https://msdn.microsoft.com/en-us/powershell/dsc/packageResource), then compiled it and waited for my servers to pull the MOF files.

Went on my SharePoint Server and found this error:

Log Name:      Microsoft-Windows-DSC/Operational
Source:        Microsoft-Windows-DSC
Date:          7/7/2017 2:04:37 PM
Event ID:      4250
Task Category: None
Level:         Error
Keywords:
User:          WEAVER\sp2016setupacct
Computer:      SP2016WFE01.weaver.ad
Description:
Job {92C41408-633E-11E7-80E1-001DD8BAE83F} :
Message The specified Name (Microsoft SQL Server 2014 RS Add-in for SharePoint) and IdentifyingNumber ({1C4A60D6-1C89-48C7-BAB5-8ED35967D2AD}) do not match Name (Microsoft SQL Server 2014 RS Add-in for SharePoint ) and IdentifyingNumber ({C3AF130F-8B2E-4D55-8AD1-F156F7C975E8}) in the MSI file
HResult -2146233087
StackTrack    at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.PowerShell.CoreInvokeRemoteHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.ExecuteCommand(PowerShell powerShell, ResourceModuleInfo resInfo, String operationCmd, List`1 acceptedProperties, CimInstance nonResourcePropeties, CimInstance resourceConfiguration, LCMDebugMode debugMode, PSInvocationSettings pSInvocationSettings, UInt32& resultStatusHandle, Collection`1& result, ErrorRecord& errorRecord, PSModuleInfo localRunSpaceModuleInfo)


The fix was obvious to me, and to better understand my mistake you need to understand the resource has a Property called ProductId, which is a Guid and you have to provide it for your package.  After a quick search on the internet i found nothing indicating how to get that ProductId so i ran (New-Guid).Guid and copied the characters in....oops.

Now i realize that what I should have done is install the MSI to a machine and run the following PowerShell command to get the ID as you can see in the following screenshot.

get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage

 

 

 


Oh well that's why i have a test environment, hopefully you learn from my mistake.

Pax

Version history
Last update:
‎Apr 28 2020 03:22 PM
Updated by: