profile
viewpoint
Jean-Cyril Drouhin luigilink Microsoft France https://www.linkedin.com/in/jean-cyril-drouhin/ Jean-Cyril is a Senior Office 365 Engineer with @CAGIP. His areas of specialty include PowerShell, DSC, and SharePoint.

luigilink/spswakeup 7

SPSWakeUp - Wake Up Your SharePoint

luigilink/spwakeup 2

SPWakeUp is a PowerShell script tool to warm up all site collection in your SharePoint OnPremises.

luigilink/AppFabricDsc 1

The AppFabricDsc module contains DSC resources for deployment and configuration of AppFabric in a way that is fully compliant with the requirements of System Center.

luigilink/Get-SPFarmLogs 1

This script permits SharePoint's Administrators to collect all server's logs in a centralized folder

luigilink/AutomatedLab 0

AutomatedLab is a provisioning solution and framework that lets you deploy complex labs on HyperV and Azure with simple PowerShell scripts. It supports all Windows operating systems from 2008 R2 to 2016 including Nano Server and various products like AD, Exchange, PKI, IIS, etc.

luigilink/AutoSPUpdater 0

A set of PowerShell scripts that applies SharePoint 2010/2013/2016 updates (Service Packs + Cumulative/Public Updates) farm-wide, launched centrally from any server in the farm.

luigilink/AzureRM-Templates 0

Templates for ARM

luigilink/DscResources 0

Central repository for PowerShell Desired State Configuration (DSC) resources.

PullRequestReviewEvent

issue commentdsccommunity/SharePointDsc

SPFarmAdministrators: Resource fails with error message: An item with the same key has already been added

So two things, firtsly this $stack variable in Import-SPPowerShellSnapIn.ps1 doesn't change anything on the issue, I have still "An item with the same key has already been added".

Secondly I tried something tell me if you can implement this: It seems that these two lines are responsible of the error: $script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '....\Modules\SharePointDsc.Util' Import-Module -Name $script:SPDscUtilModulePath

The SharePointDsc.Util module is already loaded from the SharePointDsc.psd1 file at the line 71: NestedModules = @("Modules\SharePointDsc.Util\SharePointDsc.Util.psd1")

I removed these two lines on each resource files and no more issue during the full deployement of a SharePoint Farm.

@ykuijs what do you think ?

PwrKjll

comment created time in 2 months

issue commentdsccommunity/SharePointDsc

SPFarmAdministrators: Resource fails with error message: An item with the same key has already been added

Hi @ykuijs for this long silence; I will check today and share my result with the $stack variable in Import-SPPowerShellSnapIn.ps1

PwrKjll

comment created time in 2 months

more