DSCResources/cTeamsUpgradeConfiguration/cTeamsUpgradeConfiguration.schema.psm1
configuration cTeamsUpgradeConfiguration { param ( [Parameter(Mandatory = $true)] [ValidateSet('Yes')] [string] $IsSingleInstance, [Parameter()] [bool] $DownloadTeams, [Parameter()] [ValidateSet('SkypeMeetingsApp', 'NativeLimitedClient')] [string] $SfBMeetingJoinUx, [Parameter()] [PSCredential] $Credential, [Parameter()] [string] $ApplicationId, [Parameter()] [string] $TenantId, [Parameter()] [string] $CertificateThumbprint, [Parameter()] [bool] $ManagedIdentity, [Parameter()] [string[]] $AccessTokens ) <# TeamsUpgradeConfiguration [String] #ResourceName { IsSingleInstance = [string]{ Yes } [AccessTokens = [string[]]] [ApplicationId = [string]] [CertificateThumbprint = [string]] [Credential = [PSCredential]] [DependsOn = [string[]]] [DownloadTeams = [bool]] [ManagedIdentity = [bool]] [PsDscRunAsCredential = [PSCredential]] [SfBMeetingJoinUx = [string]{ NativeLimitedClient | SkypeMeetingsApp }] [TenantId = [string]] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'TeamsUpgradeConfiguration' $param = $PSBoundParameters $param.Remove("InstanceName") $dscParameterKeys = 'IsSingleInstance' -split ', ' $keyValues = foreach ($key in $dscParameterKeys) { $param.$key } $executionName = $keyValues -join '_' $executionName = $executionName -replace "[\s()\\:*-+/{}```"']", '_' (Get-DscSplattedResource -ResourceName $dscResourceName -ExecutionName $executionName -Properties $param -NoInvoke).Invoke($param) } |