diff --git a/CHANGELOG.md b/CHANGELOG.md index 531a56fd91..0c40168611 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Change log for Microsoft365DSC +# 1.24.131.1 + +* EXOAvailabilityAddressSpace + * Added support for the TargetServiceEpr and TargetTenantId parameters. + * Fixed the logic to retrieve existing instance by Forest Name. +* EXODistributionGroup + * The Get function now retrieves the ModeratedBy and ManagedBy properties + by the users' UPN instead of their GUID. +* EXOHostedContentFilterRule + * Changed logic to retrieve the Rules by name. Using the Policy's name instead. +* EXOIntraOrganizationConnector + * Fixes the DiscoveryEndpoint value from the Get method to include trailing + forward slash. +* EXOMalwareFilterRule + * Fixed an issue retrieving the right value for the Enabled property +* EXOOMEConfiguration + * Fixes an error in the Get method where the ExternalMailExpiryInDays property + wasn't properly returned. +* EXOSafeLinksPolicy + * Deprecated the UseTranslatedNotificationText property +* TeamsEmergencyCallRoutingPolicy + * Fix deletion of resource + FIXES [#4261](https://github.com/microsoft/Microsoft365DSC/issues/4261) +* TEAMS + * Added support for ManagedIdentity Authentication across Teams resources. +* DEPENDENCIES + * Updated MSCloudLoginAssistant dependencies to version 1.1.10. +* MISC + * Change the way to Export encoding is done so that it no longer relies + on the Get-DSCResource function. + # 1.24.124.1 * AADAuthenticationMethodPolicyAuthenticator diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 index 6fc5d8d6d7..a5a1401f1e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 @@ -87,14 +87,11 @@ function Get-TargetResource try { Write-Verbose -Message 'Getting all Accepted Domain' - $AllAcceptedDomains = Get-AcceptedDomain -ErrorAction Stop - - Write-Verbose -Message 'Filtering Accepted Domain list by Identity' - $AcceptedDomain = $AllAcceptedDomains | Where-Object -FilterScript { $_.Identity -eq $Identity } + $AcceptedDomain = Get-AcceptedDomain -Identity $Identity -ErrorAction SilentlyContinue if ($null -eq $AcceptedDomain) { - Write-Verbose -Message "AcceptedDomain configuration for $($Identity) does not exist." + Write-Verbose -Message "AcceptedDomain configuration for {$($Identity)} does not exist." return $nullReturn } else @@ -151,12 +148,10 @@ function Set-TargetResource $Ensure = 'Present', [Parameter()] - [ValidateScript( { $false -eq $_ })] [System.Boolean] $MatchSubDomains = $false, [Parameter()] - [ValidateScript( { $false -eq $_ })] [System.Boolean] $OutboundOnly = $false, @@ -223,7 +218,7 @@ function Set-TargetResource OutboundOnly = $OutboundOnly } - Write-Verbose -Message "Setting AcceptedDomain for $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $AcceptedDomainParams)" + Write-Verbose -Message "Setting AcceptedDomain for {$($Identity)} with values: $(Convert-M365DscHashtableToString -Hashtable $AcceptedDomainParams)" Set-AcceptedDomain @AcceptedDomainParams } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 index 60468be205..d046f1751e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 @@ -483,11 +483,19 @@ function Set-TargetResource ConditionalCustomAttribute9 = $ConditionalCustomAttribute9 ConditionalDepartment = $ConditionalDepartment ConditionalStateOrProvince = $ConditionalStateOrProvince - DisplayName = $DisplayName IncludedRecipients = $IncludedRecipients - RecipientFilter = $RecipientFilter Confirm = $false } + + if (-not [System.String]::IsNullOrEmpty($DisplayName)) + { + $SetAddressListParams.Add('DisplayName', $DisplayName) + } + + if (-not [System.String]::IsNullOrEmpty($RecipientFilter)) + { + $SetAddressListParams.Add('RecipientFilter', $RecipientFilter) + } } Write-Verbose -Message "Setting Address List '$($Name)' with values: $(Convert-M365DscHashtableToString -Hashtable $SetAddressListParams)" Set-AddressList @SetAddressListParams diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 index 5897eda34b..d7f80154ca 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 @@ -10,7 +10,7 @@ function Get-TargetResource $Identity, [Parameter()] - [ValidateSet('PerUserFB', 'OrgWideFB', 'OrgWideFBBasic', 'InternalProxy')] + [ValidateSet('PerUserFB', 'OrgWideFB', 'OrgWideFBToken', 'OrgWideFBBasic', 'InternalProxy')] [System.String] $AccessMethod, @@ -26,6 +26,14 @@ function Get-TargetResource [System.String] $TargetAutodiscoverEpr, + [Parameter()] + [System.String] + $TargetServiceEpr, + + [Parameter()] + [System.String] + $TargetTenantId, + [Parameter()] [ValidateSet('Present', 'Absent')] [System.String] @@ -91,7 +99,7 @@ function Get-TargetResource { try { - $AvailabilityAddressSpaces = Get-AvailabilityAddressSpace -ErrorAction Stop + $AvailabilityAddressSpace = Get-AvailabilityAddressSpace -Identity $ForestName -ErrorAction Stop } catch { @@ -99,17 +107,13 @@ function Get-TargetResource -Exception $_ ` -Source $MyInvocation.MyCommand.ModuleName } - - $AvailabilityAddressSpace = $AvailabilityAddressSpaces | Where-Object -FilterScript { $_.Identity -eq $Identity } if ($null -eq $AvailabilityAddressSpace) { - Write-Verbose -Message "AvailabilityAddressSpace $($Identity) does not exist." + Write-Verbose -Message "AvailabilityAddressSpace $($ForestName) does not exist." return $nullReturn } else { - - if ($Null -eq $AvailabilityAddressSpace.TargetAutodiscoverEpr -or $AvailabilityAddressSpace.TargetAutodiscoverEpr -eq '' ) { $TargetAutodiscoverEpr = '' @@ -123,6 +127,8 @@ function Get-TargetResource Identity = $Identity AccessMethod = $AvailabilityAddressSpace.AccessMethod Credentials = $AvailabilityAddressSpace.Credentials + TargetServiceEpr = $AvailabilityAddressSpace.TargetServiceEpr + TargetTenantId = $AvailabilityAddressSpace.TargetTenantId ForestName = $AvailabilityAddressSpace.ForestName TargetAutodiscoverEpr = $TargetAutodiscoverEpr Credential = $Credential @@ -163,7 +169,7 @@ function Set-TargetResource $Identity, [Parameter()] - [ValidateSet('PerUserFB', 'OrgWideFB', 'OrgWideFBBasic', 'InternalProxy')] + [ValidateSet('PerUserFB', 'OrgWideFB', 'OrgWideFBToken', 'OrgWideFBBasic', 'InternalProxy')] [System.String] $AccessMethod, @@ -179,6 +185,14 @@ function Set-TargetResource [System.String] $TargetAutodiscoverEpr, + [Parameter()] + [System.String] + $TargetServiceEpr, + + [Parameter()] + [System.String] + $TargetTenantId, + [Parameter()] [ValidateSet('Present', 'Absent')] [System.String] @@ -229,18 +243,8 @@ function Set-TargetResource $ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' ` -InboundParameters $PSBoundParameters - try - { - $AvailabilityAddressSpaces = Get-AvailabilityAddressSpace -ea stop - } - catch - { - New-M365DSCLogEntry -Message "Couldn't get AvailabilityAddressSpaces" ` - -Exception $_ ` - -Source $MyInvocation.MyCommand.ModuleName - } + $currentInstance = Get-TargetResource @PSBoundParameters - $AvailabilityAddressSpace = $AvailabilityAddressSpaces | Where-Object -FilterScript { $_.Identity -eq $Identity } $AvailabilityAddressSpaceParams = [System.Collections.Hashtable]($PSBoundParameters) $AvailabilityAddressSpaceParams.Remove('Ensure') | Out-Null $AvailabilityAddressSpaceParams.Remove('Credential') | Out-Null @@ -251,7 +255,7 @@ function Set-TargetResource $AvailabilityAddressSpaceParams.Remove('CertificatePassword') | Out-Null $AvailabilityAddressSpaceParams.Remove('ManagedIdentity') | Out-Null - if (('Present' -eq $Ensure ) -and ($null -eq $AvailabilityAddressSpace)) + if ('Present' -eq $Ensure -and $currentInstance.Ensure -eq 'Absent') { Write-Verbose -Message "Creating AvailabilityAddressSpace $($Identity)." # AvailabilityAddressSpace doe not have a new-AvailabilityAddressSpace cmdlet but instead uses an add-AvailabilityAddressSpace cmdlet @@ -268,7 +272,7 @@ function Set-TargetResource -Source $MyInvocation.MyCommand.ModuleName } } - elseif (('Present' -eq $Ensure ) -and ($Null -ne $AvailabilityAddressSpace)) + elseif ('Present' -eq $Ensure -and $currentInstance.Ensure -eq 'Present') { Write-Verbose -Message "Setting AvailabilityAddressSpace $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $AvailabilityAddressSpaceParams)" # AvailabilityAddressSpace is a special case in that it does not have a "set-AvailabilityAddressSpace" cmdlet. To change values of an existing AvailabilityAddressSpace it must be removed and then added again with add-AvailabilityAddressSpace @@ -287,7 +291,7 @@ function Set-TargetResource { $AvailabilityAddressSpaceParams.Remove('Identity') | Out-Null $AvailabilityAddressSpaceParams.Remove('Credentials') | Out-Null - add-AvailabilityAddressSpace @AvailabilityAddressSpaceParams -ea stop + Add-AvailabilityAddressSpace @AvailabilityAddressSpaceParams -ea stop } catch { @@ -296,7 +300,7 @@ function Set-TargetResource -Source $MyInvocation.MyCommand.ModuleName } } - elseif (('Absent' -eq $Ensure ) -and ($null -ne $AvailabilityAddressSpace)) + elseif ('Absent' -eq $Ensure -and $currentInstance.Ensure -eq 'Present') { Write-Verbose -Message "Removing AvailabilityAddressSpace $($Identity)" try @@ -323,7 +327,7 @@ function Test-TargetResource $Identity, [Parameter()] - [ValidateSet('PerUserFB', 'OrgWideFB', 'OrgWideFBBasic', 'InternalProxy')] + [ValidateSet('PerUserFB', 'OrgWideFB', 'OrgWideFBToken', 'OrgWideFBBasic', 'InternalProxy')] [System.String] $AccessMethod, @@ -339,6 +343,14 @@ function Test-TargetResource [System.String] $TargetAutodiscoverEpr, + [Parameter()] + [System.String] + $TargetServiceEpr, + + [Parameter()] + [System.String] + $TargetTenantId, + [Parameter()] [ValidateSet('Present', 'Absent')] [System.String] @@ -399,6 +411,7 @@ function Test-TargetResource $ValuesToCheck.Remove('CertificatePath') | Out-Null $ValuesToCheck.Remove('CertificatePassword') | Out-Null $ValuesToCheck.Remove('ManagedIdentity') | Out-Null + $ValuesToCheck.Remove('Identity') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof index 12da6f39d9..504f3b02af 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof @@ -3,10 +3,12 @@ class MSFT_EXOAvailabilityAddressSpace : OMI_BaseResource { [Key, Description("The Identity parameter specifies the AvailabilityAddressSpace you want to modify.")] String Identity; - [Write, Description("The AccessMethod parameter specifies how the free/busy data is accessed. Valid values are:PerUserFB, OrgWideFB, OrgWideFBBasic,InternalProxy"), ValueMap{"PerUserFB","OrgWideFB","OrgWideFBBasic","InternalProxy"}, Values{"PerUserFB","OrgWideFB","OrgWideFBBasic","InternalProxy"}] String AccessMethod; + [Write, Description("The AccessMethod parameter specifies how the free/busy data is accessed. Valid values are:PerUserFB, OrgWideFB, OrgWideFBToken, OrgWideFBBasic,InternalProxy"), ValueMap{"PerUserFB","OrgWideFB","OrgWideFBToken","OrgWideFBBasic","InternalProxy"}, Values{"PerUserFB","OrgWideFB","OrgWideFBToken","OrgWideFBBasic","InternalProxy"}] String AccessMethod; [Write, Description("The Credentials parameter specifies the username and password that's used to access the Availability services in the target forest.")] String Credentials; [Write, Description("The ForestName parameter specifies the SMTP domain name of the target forest for users whose free/busy data must be retrieved. If your users are distributed among multiple SMTP domains in the target forest, run the Add-AvailabilityAddressSpace command once for each SMTP domain.")] String ForestName; [Write, Description("The TargetAutodiscoverEpr parameter specifies the Autodiscover URL of Exchange Web Services for the external organization. Exchange uses Autodiscover to automatically detect the correct server endpoint for external requests.")] String TargetAutodiscoverEpr; + [Write, Description("The TargetServiceEpr parameter specifies the Exchange Online Calendar Service URL of the external Microsoft 365 organization that you're trying to read free/busy information from.")] String TargetServiceEpr; + [Write, Description("The TargetTenantID parameter specifies the tenant ID of the external Microsoft 365 organization that you're trying to read free/busy information from.")] String TargetTenantId; [Write, Description("Specifies if this AvailabilityAddressSpace should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; [Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential; [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 index 9bf80ec4b8..a0d4e1ad4f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 @@ -54,6 +54,9 @@ function Get-TargetResource -InboundParameters $PSBoundParameters } + $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` + -InboundParameters $PSBoundParameters + #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -76,15 +79,16 @@ function Get-TargetResource if ($null -ne $AvailabilityConfigs -and $null -ne $AvailabilityConfigs.OrgWideAccount) { - $AvailabilityConfig = ($AvailabilityConfigs | Where-Object -FilterScript { $_.OrgWideAccount -IMatch $OrgWideAccount }) + $user = Get-MgUser -UserId $OrgWideAccount -ErrorAction Stop + $AvailabilityConfig = ($AvailabilityConfigs | Where-Object -FilterScript { $_.OrgWideAccount -IMatch $user.UserId }) } if ($null -eq $AvailabilityConfig) { - Write-Verbose -Message "Availability config for $($OrgWideAccount) does not exist." + Write-Verbose -Message "Availability config for [$($OrgWideAccount)] does not exist." return $nullReturn } $result = @{ - OrgWideAccount = $AvailabilityConfig.OrgWideAccount + OrgWideAccount = $OrgWideAccount Ensure = 'Present' Credential = $Credential ApplicationId = $ApplicationId @@ -263,10 +267,6 @@ function Test-TargetResource $ValuesToCheck.Remove('ManagedIdentity') | Out-Null $DesiredValues = $PSBoundParameters - if ($OrgWideAccount.Contains('@')) - { - $DesiredValues.OrgWideAccount = $OrgWideAccount.Split('@')[0] - } $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 index 52a5afcf6d..f5add5b03b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 @@ -300,6 +300,39 @@ function Get-TargetResource $groupTypeValue = 'Security' } + $ManagedByValue = @() + if ($null -ne $distributionGroup.ManagedBy) + { + foreach ($user in $distributionGroup.ManagedBy) + { + try + { + $user = Get-MgUser -UserId $user -ErrorAction Stop + $ManagedByValue += $user.UserPrincipalName + } + catch + { + Write-Verbose -Message "Couldn't retrieve user {$user}" + } + } + } + + $ModeratedByValue = @() + if ($null -ne $distributionGroup.ModeratedBy) + { + foreach ($user in $distributionGroup.ModeratedBy) + { + try + { + $user = Get-MgUser -UserId $user -ErrorAction Stop + $ModeratedByValue += $user.UserPrincipalName + } + catch + { + Write-Verbose -Message "Couldn't retrieve moderating user {$user}" + } + } + } $result = @{ Identity = $distributionGroup.Identity Alias = $distributionGroup.Alias @@ -308,11 +341,11 @@ function Get-TargetResource Description = $descriptionValue DisplayName = $distributionGroup.DisplayName HiddenGroupMembershipEnabled = $distributionGroup.HiddenGroupMembershipEnabled - ManagedBy = $distributionGroup.ManagedBy + ManagedBy = $ManagedByValue MemberDepartRestriction = $distributionGroup.MemberDepartRestriction MemberJoinRestriction = $distributionGroup.MemberJoinRestriction Members = $distributionGroupMembers.Name - ModeratedBy = $distributionGroup.ModeratedBy + ModeratedBy = $ModeratedByValue ModerationEnabled = $distributionGroup.ModerationEnabled Name = $distributionGroup.Name Notes = $distributionGroup.Notes diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 index cde0a678b5..7d506a2fe0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 @@ -411,9 +411,13 @@ function Set-TargetResource ConditionalCustomAttribute9 = $ConditionalCustomAttribute9 ConditionalDepartment = $ConditionalDepartment ConditionalStateOrProvince = $ConditionalStateOrProvince - IncludedRecipients = $IncludedRecipients Confirm = $false } + + if (-not [System.String]::IsNullOrEmpty($IncludedRecipients)) + { + $NewGlobalAddressListParams.Add('IncludedRecipients', $IncludedRecipients) + } } $SetGlobalAddressListParams = @{ @@ -437,11 +441,19 @@ function Set-TargetResource ConditionalCustomAttribute9 = $ConditionalCustomAttribute9 ConditionalDepartment = $ConditionalDepartment ConditionalStateOrProvince = $ConditionalStateOrProvince - IncludedRecipients = $IncludedRecipients - RecipientFilter = $RecipientFilter Confirm = $false } + if (-not [System.String]::IsNullOrEmpty($IncludedRecipients)) + { + $SetGlobalAddressListParams.Add('IncludedRecipients', $IncludedRecipients) + } + + if (-not [System.String]::IsNullOrEmpty($RecipientFilter)) + { + $SetGlobalAddressListParams.Add('RecipientFilter', $RecipientFilter) + } + # CASE: Global Address List doesn't exist but should; if ($Ensure -eq 'Present' -and $currentGlobalAddressListConfig.Ensure -eq 'Absent') { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 index 4f98aaa8e9..901a6c1282 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 @@ -96,7 +96,7 @@ function Get-TargetResource try { - $HostedConnectionFilterPolicys = Get-HostedConnectionFilterPolicy -ErrorAction Stop + $HostedConnectionFilterPolicy = Get-HostedConnectionFilterPolicy -Identity $Identity -ErrorAction Stop } catch { @@ -107,10 +107,9 @@ function Get-TargetResource return $nullReturn } - $HostedConnectionFilterPolicy = $HostedConnectionFilterPolicys | Where-Object -FilterScript { $_. Identity -eq $Identity } if (-not $HostedConnectionFilterPolicy) { - Write-Verbose -Message "HostedConnectionFilterPolicy $($Identity) does not exist." + Write-Verbose -Message "HostedConnectionFilterPolicy [$($Identity)] does not exist." return $nullReturn } else @@ -234,9 +233,7 @@ function Set-TargetResource $ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' ` -InboundParameters $PSBoundParameters - $HostedConnectionFilterPolicys = Get-HostedConnectionFilterPolicy - - $HostedConnectionFilterPolicy = $HostedConnectionFilterPolicys | Where-Object -FilterScript { $_.Identity -eq $Identity } + $CurrentInstance = Get-TargetResource @PSBoundParameters $HostedConnectionFilterPolicyParams = [System.Collections.Hashtable]($PSBoundParameters) $HostedConnectionFilterPolicyParams.Remove('Ensure') | Out-Null @@ -257,7 +254,7 @@ function Set-TargetResource $HostedConnectionFilterPolicyParams.Remove('RuleScope') | Out-Null } - if (('Present' -eq $Ensure ) -and ($null -eq $HostedConnectionFilterPolicy)) + if (('Present' -eq $Ensure ) -and $CurrentInstance.Ensure -eq 'Absent') { $HostedConnectionFilterPolicyParams += @{ Name = $HostedConnectionFilterPolicyParams.Identity @@ -265,14 +262,18 @@ function Set-TargetResource $HostedConnectionFilterPolicyParams.Remove('Identity') | Out-Null if ($PSBoundParameters.MakeDefault) { + Write-Verbose -Message "Creating New Default Policy {$Identity}" New-HostedConnectionFilterPolicy @HostedConnectionFilterPolicyParams -MakeDefault } else { + Write-Verbose -Message "Creating New Policy {$Identity}" New-HostedConnectionFilterPolicy @HostedConnectionFilterPolicyParams } + + Write-Verbose -Message "With Parameters: $(Convert-M365DscHashtableToString -Hashtable $HostedConnectionFilterPolicyParams)" } - elseif (('Present' -eq $Ensure ) -and ($HostedConnectionFilterPolicy)) + elseif (('Present' -eq $Ensure ) -and $CurrentInstance.Ensure -eq 'Present') { if ($PSBoundParameters.MakeDefault) { @@ -283,9 +284,9 @@ function Set-TargetResource Set-HostedConnectionFilterPolicy @HostedConnectionFilterPolicyParams -Confirm:$false } } - elseif (('Absent' -eq $Ensure ) -and ($HostedConnectionFilterPolicy)) + elseif (('Absent' -eq $Ensure ) -and $CurrentInstance.Ensure -eq 'Present') { - Write-Verbose -Message "Removing HostedConnectionFilterPolicy $($Identity) " + Write-Verbose -Message "Removing HostedConnectionFilterPolicy $($Identity)" Remove-HostedConnectionFilterPolicy -Identity $Identity -Confirm:$false } } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 index 7c98904f0a..90c58d92c2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 @@ -50,6 +50,7 @@ function Get-TargetResource [System.Boolean] $DownloadLink = $false, + #DEPRECATED [Parameter()] [System.Boolean] $EnableEndUserSpamNotifications = $false, @@ -302,9 +303,7 @@ function Get-TargetResource $nullReturn.Ensure = 'Absent' try { - $HostedContentFilterPolicies = Get-HostedContentFilterPolicy -ErrorAction Stop - - $HostedContentFilterPolicy = $HostedContentFilterPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity } + $HostedContentFilterPolicy = Get-HostedContentFilterPolicy -Identity $Identity -ErrorAction Stop if ($null -eq $HostedContentFilterPolicy) { Write-Verbose -Message "HostedContentFilterPolicy $($Identity) does not exist." @@ -344,12 +343,14 @@ function Get-TargetResource BulkSpamAction = $HostedContentFilterPolicy.BulkSpamAction BulkThreshold = $HostedContentFilterPolicy.BulkThreshold DownloadLink = $HostedContentFilterPolicy.DownloadLink - EnableEndUserSpamNotifications = $HostedContentFilterPolicy.EnableEndUserSpamNotifications + #Deprecated + #EnableEndUserSpamNotifications = $HostedContentFilterPolicy.EnableEndUserSpamNotifications EnableLanguageBlockList = $HostedContentFilterPolicy.EnableLanguageBlockList EnableRegionBlockList = $HostedContentFilterPolicy.EnableRegionBlockList - EndUserSpamNotificationCustomSubject = $HostedContentFilterPolicy.EndUserSpamNotificationCustomSubject - EndUserSpamNotificationFrequency = $HostedContentFilterPolicy.EndUserSpamNotificationFrequency - EndUserSpamNotificationLanguage = $HostedContentFilterPolicy.EndUserSpamNotificationLanguage + #Deprecated + #EndUserSpamNotificationCustomSubject = $HostedContentFilterPolicy.EndUserSpamNotificationCustomSubject + #EndUserSpamNotificationFrequency = $HostedContentFilterPolicy.EndUserSpamNotificationFrequency + #EndUserSpamNotificationLanguage = $HostedContentFilterPolicy.EndUserSpamNotificationLanguage HighConfidencePhishAction = $HostedContentFilterPolicy.HighConfidencePhishAction HighConfidencePhishQuarantineTag = $HostedContentFilterPolicy.HighConfidencePhishQuarantineTag HighConfidenceSpamAction = $HostedContentFilterPolicy.HighConfidenceSpamAction @@ -406,6 +407,7 @@ function Get-TargetResource } catch { + Write-Verbose -Message $_ New-M365DSCLogEntry -Message 'Error retrieving data:' ` -Exception $_ ` -Source $($MyInvocation.MyCommand.Source) ` @@ -1055,6 +1057,10 @@ function Test-TargetResource $ValuesToCheck.Remove('CertificatePath') | Out-Null $ValuesToCheck.Remove('CertificatePassword') | Out-Null $ValuesToCheck.Remove('ManagedIdentity') | Out-Null + $ValuesToCheck.Remove('EnableEndUserSpamNotifications') | Out-Null + $ValuesToCheck.Remove('EndUserSpamNotificationLanguage') | Out-Null + $ValuesToCheck.Remove('EndUserSpamNotificationFrequency') | Out-Null + $ValuesToCheck.Remove('EndUserSpamNotificationCustomSubject') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 index 7e8fc2eea6..ff9a042c4b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 @@ -114,7 +114,7 @@ function Get-TargetResource { try { - $HostedContentFilterRules = Get-HostedContentFilterRule -ErrorAction Stop + $HostedContentFilterRule = Get-HostedContentFilterRule -Identity $HostedContentFilterPolicy -ErrorAction Stop } catch { @@ -123,8 +123,6 @@ function Get-TargetResource -Exception $_ ` -Source $MyInvocation.MyCommand.ModuleName } - - $HostedContentFilterRule = $HostedContentFilterRules | Where-Object -FilterScript { $_.Identity -eq $Identity } if (-not $HostedContentFilterRule) { Write-Verbose -Message "HostedContentFilterRule $($Identity) does not exist." @@ -316,6 +314,7 @@ function Set-TargetResource Remove-HostedContentFilterRule -Identity $Identity -Confirm:$false } Write-Verbose -Message "Creating new HostedContentFilterRule {$Identity}" + Write-Verbose -Message "With Parameters: $(Convert-M365DscHashtableToString -Hashtable $CreationParams)" $CreationParams.Add('Name', $Identity) $CreationParams.Remove('Identity') | Out-Null New-HostedContentFilterRule @CreationParams @@ -332,6 +331,7 @@ function Set-TargetResource $UpdateParams.Remove('CertificatePassword') | Out-Null $UpdateParams.Remove('ManagedIdentity') | Out-Null $UpdateParams.Remove('Enabled') | Out-Null + $UpdateParams.Identity = $HostedContentFilterPolicy if ($CurrentValues.HostedContentFilterPolicy -eq $UpdateParams.HostedContentFilterPolicy ) { $UpdateParams.Remove('HostedContentFilterPolicy') | Out-Null @@ -456,6 +456,7 @@ function Test-TargetResource $ValuesToCheck.Remove('CertificatePath') | Out-Null $ValuesToCheck.Remove('CertificatePassword') | Out-Null $ValuesToCheck.Remove('ManagedIdentity') | Out-Null + $ValuesToCheck.Remove('Identity') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 index 935ba37c9b..b70c9d634e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 @@ -96,6 +96,11 @@ function Get-TargetResource } else { + $DiscoveryEndpointValue = $IntraOrganizationConnector.DiscoveryEndpoint.ToString() + if (-not $DiscoveryEndpointValue.EndsWith('/')) + { + $DiscoveryEndpointValue += '/' + } $result = @{ Identity = $Identity DiscoveryEndpoint = $IntraOrganizationConnector.DiscoveryEndpoint.ToString() diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 index b8a2a11c9b..e04646db5b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 @@ -112,9 +112,7 @@ function Get-TargetResource $nullReturn.Ensure = 'Absent' try { - $MalwareFilterRules = Get-MalwareFilterRule -ErrorAction Stop - - $MalwareFilterRule = $MalwareFilterRules | Where-Object -FilterScript { $_.Identity -eq $Identity } + $MalwareFilterRule = Get-MalwareFilterRule -Identity $Identity -ErrorAction SilentlyContinue if ($null -eq $MalwareFilterRule) { Write-Verbose -Message "MalwareFilterRule $($Identity) does not exist." @@ -122,10 +120,15 @@ function Get-TargetResource } else { + $EnabledValue = $false + if ($MalwareFilterRule.State -eq 'Enabled') + { + $EnabledValue = $true + } $result = @{ Identity = $Identity Comments = $MalwareFilterRule.Comments - Enabled = $MalwareFilterRule.Enabled + Enabled = $EnabledValue ExceptIfRecipientDomainIs = $MalwareFilterRule.ExceptIfRecipientDomainIs ExceptIfSentTo = $MalwareFilterRule.ExceptIfSentTo ExceptIfSentToMemberOf = $MalwareFilterRule.ExceptIfSentToMemberOf diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 index a877bc1820..8b49da6bed 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 @@ -105,9 +105,8 @@ function Get-TargetResource try { - $MessageClassifications = Get-MessageClassification -ErrorAction Stop + $MessageClassification = Get-MessageClassification -Identity $Identity -ErrorAction Stop - $MessageClassification = $MessageClassifications | Where-Object -FilterScript { $_.Identity -eq $Identity } if ($null -eq $MessageClassification) { Write-Verbose -Message "Message Classification policy $($Identity) does not exist." diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 index 3e8aaa3100..c9a7c719c6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 @@ -132,7 +132,7 @@ function Get-TargetResource BackgroundColor = $OMEConfiguration.BackgroundColor DisclaimerText = $OMEConfiguration.DisclaimerText EmailText = $OMEConfiguration.EmailText - ExternalMailExpiryInDays = $OMEConfiguration.ExternalMailExpiryInDays + ExternalMailExpiryInDays = $OMEConfiguration.ExternalMailExpiryInterval.Days # Image = $OMEConfiguration.Image IntroductionText = $OMEConfiguration.IntroductionText OTPEnabled = $OMEConfiguration.OTPEnabled diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 index 8eac15297c..c2c6ed8690 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 @@ -243,7 +243,6 @@ function Set-TargetResource InboundConnector = $InboundConnector OrganizationName = $OrganizationName OrganizationGuid = $OrganizationGuid - OrganizationRelationship = $OrganizationRelationship OutboundConnector = $OutboundConnector Confirm = $false } @@ -254,11 +253,16 @@ function Set-TargetResource HybridDomains = $HybridDomains InboundConnector = $InboundConnector OrganizationName = $OrganizationName - OrganizationRelationship = $OrganizationRelationship OutboundConnector = $OutboundConnector Confirm = $false } + if (-not [System.String]::IsNullOrEmpty($OrganizationRelationship)) + { + $NewOnPremisesOrganizationParams.Add('OrganizationRelationship', $OrganizationRelationship) + $SetOnPremisesOrganizationParams.Add('OrganizationRelationship', $OrganizationRelationship) + } + # CASE: On-premises Organization doesn't exist but should; if ($Ensure -eq 'Present' -and $currentOnPremisesOrganizationConfig.Ensure -eq 'Absent') { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 index 1916175cc0..86c8272b25 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 @@ -224,9 +224,7 @@ function Set-TargetResource Name = $Name ApplicationIdentifier = $ApplicationIdentifier AcceptSecurityIdentifierInformation = $AcceptSecurityIdentifierInformation - AccountType = $AccountType Enabled = $Enabled - LinkedAccount = $LinkedAccount Confirm = $false } @@ -235,12 +233,22 @@ function Set-TargetResource Name = $Name ApplicationIdentifier = $ApplicationIdentifier AcceptSecurityIdentifierInformation = $AcceptSecurityIdentifierInformation - AccountType = $AccountType Enabled = $Enabled - LinkedAccount = $LinkedAccount Confirm = $false } + if (-not [System.String]::IsNullOrEmpty($AccountType)) + { + $NewPartnerApplicationParams.Add('AccountType', $AccountType) + $SetPartnerApplicationParams.Add('AccountType', $AccountType) + } + + if (-not [System.String]::IsNullOrEmpty($LinkedAccount)) + { + $NewPartnerApplicationParams.Add('LinkedAccount', $LinkedAccount) + $SetPartnerApplicationParams.Add('LinkedAccount', $LinkedAccount) + } + # CASE: Partner Application doesn't exist but should; if ($Ensure -eq 'Present' -and $currentPartnerApplicationConfig.Ensure -eq 'Absent') { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 index 892843da04..d6ec4c16ab 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 @@ -127,12 +127,9 @@ function Get-TargetResource $nullReturn.Ensure = 'Absent' try { - Write-Verbose -Message 'Global ExchangeOnlineSession status:' - Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)" - try { - $SafeLinksPolicies = Get-SafeLinksPolicy -ErrorAction Stop + $SafeLinksPolicy = Get-SafeLinksPolicy -Identity $Identity -ErrorAction Stop } catch { @@ -141,8 +138,6 @@ function Get-TargetResource -Exception $_ ` -Source $MyInvocation.MyCommand.ModuleName } - - $SafeLinksPolicy = $SafeLinksPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity } if (-not $SafeLinksPolicy) { Write-Verbose -Message "SafeLinksPolicy $($Identity) does not exist." @@ -165,7 +160,8 @@ function Get-TargetResource DisableUrlRewrite = $SafeLinksPolicy.DisableUrlRewrite ScanUrls = $SafeLinksPolicy.ScanUrls TrackClicks = $SafeLinksPolicy.TrackClicks - UseTranslatedNotificationText = $SafeLinksPolicy.UseTranslatedNotificationText + # The Get-SafeLinksPolicy no longer returns this property + # UseTranslatedNotificationText = $SafeLinksPolicy.UseTranslatedNotificationText Ensure = 'Present' Credential = $Credential ApplicationId = $ApplicationId @@ -472,6 +468,7 @@ function Test-TargetResource $ValuesToCheck.Remove('CertificatePath') | Out-Null $ValuesToCheck.Remove('CertificatePassword') | Out-Null $ValuesToCheck.Remove('ManagedIdentity') | Out-Null + $ValuesToCheck.Remove('UseTranslatedNotificationText') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.psm1 index 2b1116f93a..2d827e4c6b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.psm1 @@ -55,7 +55,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -116,6 +120,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -187,7 +192,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -327,7 +336,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -441,7 +454,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.schema.mof index 14e44cfc7a..ca2196ca1b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppPermissionPolicy/MSFT_TeamsAppPermissionPolicy.schema.mof @@ -14,4 +14,5 @@ class MSFT_TeamsAppPermissionPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.psm1 index 7d4a44b0b7..6e99c8ba52 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.psm1 @@ -55,7 +55,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -98,6 +102,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -169,7 +174,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -327,7 +336,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -437,7 +450,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.schema.mof index 0360966308..a3b04dd714 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAppSetupPolicy/MSFT_TeamsAppSetupPolicy.schema.mof @@ -14,4 +14,5 @@ class MSFT_TeamsAppSetupPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.psm1 index 28dd0906ff..43a53564cd 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -73,6 +77,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -124,7 +129,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -235,7 +244,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -360,7 +373,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.schema.mof index b589cf0147..869ee0e48d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsAudioConferencingPolicy/MSFT_TeamsAudioConferencingPolicy.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsAudioConferencingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.psm1 index 8a4ccd202d..1df4ef83b1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -73,6 +77,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -124,7 +129,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -235,7 +244,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -360,7 +373,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.schema.mof index a39de434c6..8777ca8288 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallHoldPolicy/MSFT_TeamsCallHoldPolicy.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsCallHoldPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.psm1 index aaba733498..1106286ec6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.psm1 @@ -47,7 +47,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -88,6 +92,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -151,7 +156,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -274,7 +283,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -293,8 +306,8 @@ function Test-TargetResource $CurrentValues = Get-TargetResource @PSBoundParameters $ValuesToCheck = ([Hashtable]$PSBoundParameters).Clone() - $ValuesToCheck.Remove('Identity') | Out-Null + $ValuesToCheck.Remove('Identity') | Out-Null if ($CurrentValues.Ensure -eq 'Absent') { Write-Verbose -Message "Test-TargetResource returned $false" @@ -399,7 +412,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.schema.mof index 40b026991c..b76bf0c497 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallParkPolicy/MSFT_TeamsCallParkPolicy.schema.mof @@ -12,4 +12,5 @@ class MSFT_TeamsCallParkPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.psm1 index 6c3f10b87a..d3f8b19d33 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.psm1 @@ -221,7 +221,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting configuration of Teams Call Queue {$Name}" @@ -308,6 +312,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } } @@ -545,7 +550,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting configuration of Teams Call Queue {$Name}" @@ -573,6 +582,7 @@ function Set-TargetResource $opsParameters.Remove('TenantId') | Out-Null $opsParameters.Remove('CertificateThumbprint') | Out-Null $opsParameters.Remove('Ensure') | Out-Null + $opsParameters.Remove('ManagedIdentity') | Out-Null if ($currentValues.Ensure -eq 'Absent' -and 'Present' -eq $Ensure ) { @@ -817,7 +827,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -871,7 +885,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -906,6 +924,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.schema.mof index dc9d7419c7..f3e4c87d94 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallQueue/MSFT_TeamsCallQueue.schema.mof @@ -54,5 +54,6 @@ class MSFT_TeamsCallQueue : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.psm1 index f0daee685f..ff3d791bea 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.psm1 @@ -115,7 +115,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Calling Policy $($Identity)" @@ -175,6 +179,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -305,7 +310,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting Teams Calling Policy' @@ -333,6 +342,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -470,7 +480,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -492,7 +506,6 @@ function Test-TargetResource Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" $ValuesToCheck = $PSBoundParameters - $ValuesToCheck.Remove('Credential') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` @@ -524,7 +537,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -557,6 +574,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.schema.mof index 993a8461ac..3dbbd080f0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCallingPolicy/MSFT_TeamsCallingPolicy.schema.mof @@ -27,5 +27,6 @@ class MSFT_TeamsCallingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.psm1 index 99cd1302ee..5a447d7540 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.psm1 @@ -46,7 +46,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting configuration of Teams channel $DisplayName" @@ -117,6 +121,7 @@ function Get-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint Credential = $Credential + ManagedIdentity = $ManagedIdentity.IsPresent } if ($NewDisplayName) @@ -184,7 +189,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting configuration of Teams channel $DisplayName" @@ -219,6 +228,7 @@ function Set-TargetResource $CurrentParameters.Remove('TenantId') | Out-Null $CurrentParameters.Remove('CertificateThumbprint') | Out-Null $CurrentParameters.Remove('Ensure') | Out-Null + $CurrentParameters.Remove('ManagedIdentity') | Out-Null if ($CurrentParameters.ContainsKey('GroupId')) { $CurrentParameters.GroupId = $team.GroupId @@ -309,7 +319,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -360,7 +374,11 @@ function Export-TargetResource [Parameter()] [System.Management.Automation.PSCredential] - $Credential + $Credential, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -401,6 +419,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint Credential = $Credential + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.schema.mof index 123dde5109..e66d644319 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannel/MSFT_TeamsChannel.schema.mof @@ -11,5 +11,5 @@ class MSFT_TeamsChannel : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.psm1 index 34fc8b7715..eaf6a683f7 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.psm1 @@ -66,7 +66,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting configuration of Tab $DisplayName" @@ -184,6 +188,7 @@ function Get-TargetResource TenantId = $TenantID CertificateThumbprint = $CertificateThumbprint Ensure = 'Present' + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -265,7 +270,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting configuration of Team $DisplayName" @@ -293,6 +302,7 @@ function Set-TargetResource $CurrentParameters.Remove('TenantId') | Out-Null $CurrentParameters.Remove('CertificateThumbprint') | Out-Null $CurrentParameters.Remove('Credential') | Out-Null + $CurrentParameters.Remove('ManagedIdentity') | Out-Null Write-Verbose -Message "Retrieving Team Channel {$ChannelName} from Team {$($tab.TeamId)}" $ChannelInstance = Get-MgBetaTeamChannel -TeamId $tab.TeamId ` @@ -438,7 +448,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -461,9 +475,6 @@ function Test-TargetResource Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" $ValuesToCheck = $PSBoundParameters - $ValuesToCheck.Remove('TenantId') | Out-Null - $ValuesToCheck.Remove('ApplicationId') | Out-Null - $ValuesToCheck.Remove('CertificateThumbprint') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` @@ -495,7 +506,11 @@ function Export-TargetResource [Parameter()] [System.Management.Automation.PSCredential] - $Credential + $Credential, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` @@ -570,6 +585,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.schema.mof index 75da7fcdb1..62c2b473b9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelTab/MSFT_TeamsChannelTab.schema.mof @@ -16,5 +16,5 @@ class MSFT_TeamsChannelTab : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.psm1 index 1f7f9c4404..e78cd1c8ed 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.psm1 @@ -55,7 +55,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Channels Policy $($Identity)" @@ -103,6 +107,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -173,7 +178,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting Teams Channel Policy' @@ -201,6 +210,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -278,7 +288,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -331,7 +345,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -363,6 +381,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.schema.mof index 89c46ea0f6..a2584258cc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsChannelsPolicy/MSFT_TeamsChannelsPolicy.schema.mof @@ -14,4 +14,5 @@ class MSFT_TeamsChannelsPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.psm1 index 000e689dd9..92e120994d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.psm1 @@ -81,7 +81,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Client' @@ -129,6 +133,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } if ([System.String]::IsNullOrEmpty($RestrictedSenderList)) { @@ -230,7 +235,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Client' @@ -255,6 +264,7 @@ function Set-TargetResource $SetParams.Remove('ApplicationId') | Out-Null $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null if ([System.String]::IsNullOrEmpty($RestrictedSenderList)) { @@ -356,7 +366,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -413,7 +427,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -440,6 +458,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.schema.mof index 47a8ebd921..f736444075 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsClientConfiguration/MSFT_TeamsClientConfiguration.schema.mof @@ -20,5 +20,5 @@ class MSFT_TeamsClientConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.psm1 index 4a37550baa..3cd4f041a4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.psm1 @@ -47,7 +47,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -97,6 +101,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -160,7 +165,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -283,7 +292,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -408,7 +421,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.schema.mof index 25f29236af..0f32b2c355 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsComplianceRecordingPolicy/MSFT_TeamsComplianceRecordingPolicy.schema.mof @@ -12,4 +12,5 @@ class MSFT_TeamsComplianceRecordingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.psm1 index 6e61b8db5e..9000814b1a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.psm1 @@ -36,7 +36,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -74,6 +78,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -126,7 +131,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -238,7 +247,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -363,7 +376,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.schema.mof index 09ce6cdd0c..21f463f839 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsCortanaPolicy/MSFT_TeamsCortanaPolicy.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsCortanaPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.psm1 index bb9a77e5ff..b088d9fa4e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.psm1 @@ -60,7 +60,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting the Teams Dial In Conferencing Tenant Settings' @@ -103,6 +107,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -178,7 +183,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting Teams Dial In Conferencing Tenant Settings' @@ -206,6 +215,7 @@ function Set-TargetResource $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null $SetParameters.Remove('IsSingleInstance') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null try { @@ -283,7 +293,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -336,7 +350,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -362,6 +380,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.schema.mof index c8f30fb43f..1cfaa128bd 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsDialInConferencingTenantSettings/MSFT_TeamsDialInConferencingTenantSettings.schema.mof @@ -15,4 +15,5 @@ class MSFT_TeamsDialInConferencingTenantSettings : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.psm1 index 76e12f46e1..ec13f8ade8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.psm1 @@ -39,7 +39,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Emergency Call Routing Policy $Identity" @@ -82,6 +86,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } if ($policy.EmergencyNumbers.Count -gt 0) @@ -143,7 +148,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting Teams Emergency Call Routing Policy {$Identity}" @@ -188,6 +197,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($PSBoundParameters.ContainsKey('EmergencyNumbers')) { @@ -230,7 +240,7 @@ function Set-TargetResource elseif ($Ensure -eq 'Absent' -and $CurrentValues.Ensure -eq 'Present') { Write-Verbose -Message "Removing existing Teams Meeting Policy {$Identity}" - Remove-CsTeamsEmergencyCallRoutingPolicy -Identity $Identity -Confirm:$false + Remove-CsTeamsEmergencyCallRoutingPolicy -Identity $Identity } } @@ -275,7 +285,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -335,7 +349,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -367,6 +385,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $result = Get-TargetResource @params $result = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.schema.mof index 0c044f01ed..0a7d6ed6da 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallRoutingPolicy/MSFT_TeamsEmergencyCallRoutingPolicy.schema.mof @@ -17,4 +17,5 @@ class MSFT_TeamsEmergencyCallRoutingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.psm1 index b047caaebe..b93c36c008 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.psm1 @@ -54,7 +54,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Emergency Calling Policy {$Identity}" @@ -100,6 +104,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } if ([System.String]::IsNullOrEmpty($result.NotificationMode)) @@ -176,7 +181,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting Teams Emergency Calling Policy {$Identity}" @@ -221,6 +230,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -297,7 +307,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -350,7 +364,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -388,6 +406,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.schema.mof index 1d5650973f..5b2bdb9364 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEmergencyCallingPolicy/MSFT_TeamsEmergencyCallingPolicy.schema.mof @@ -13,4 +13,5 @@ class MSFT_TeamsEmergencyCallingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.psm1 index 48da559d9d..2fc0ef8df9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.psm1 @@ -39,7 +39,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -78,6 +82,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -133,7 +138,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -248,7 +257,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -373,7 +386,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.schema.mof index 59e3fd96d5..525e169db9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEnhancedEncryptionPolicy/MSFT_TeamsEnhancedEncryptionPolicy.schema.mof @@ -10,4 +10,5 @@ class MSFT_TeamsEnhancedEncryptionPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.psm1 index 8ccbb925c6..c1b05c7b9c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.psm1 @@ -79,7 +79,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Events Policy {$Identity}" @@ -130,6 +134,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return $result @@ -226,7 +231,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting Teams Events Policy {$Identity}" @@ -254,6 +263,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -353,7 +363,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -407,7 +421,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -445,6 +463,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.schema.mof index f8d8aea02d..b1c20537d6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.schema.mof @@ -18,4 +18,5 @@ class MSFT_TeamsEventsPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.psm1 index 6fe1ae47e6..47d7c7bf01 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.psm1 @@ -59,7 +59,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Federation' @@ -124,6 +128,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -198,7 +203,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Federation' @@ -224,6 +233,7 @@ function Set-TargetResource $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null $SetParams.Remove('AllowedDomains') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null if ($allowedDomains.Length -gt 0) { $SetParams.Add('AllowedDomainsAsAList', $AllowedDomains) @@ -299,7 +309,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -352,7 +366,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -379,6 +397,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.schema.mof index 14aaecce2e..f91ae23238 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFederationConfiguration/MSFT_TeamsFederationConfiguration.schema.mof @@ -15,4 +15,5 @@ class MSFT_TeamsFederationConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.psm1 index e902ca70c9..3bd7721982 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.psm1 @@ -52,7 +52,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -94,6 +98,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -162,7 +167,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -290,7 +299,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -415,7 +428,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.schema.mof index cc4896cc6c..a0f2a18be9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFeedbackPolicy/MSFT_TeamsFeedbackPolicy.schema.mof @@ -13,4 +13,5 @@ class MSFT_TeamsFeedbackPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.psm1 index 62af2c60f4..539e4f4ee5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.psm1 @@ -37,7 +37,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -75,6 +79,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -128,7 +133,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -241,7 +250,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -366,7 +379,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.schema.mof index 65d59f8b9e..a6916dcf07 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsFilesPolicy/MSFT_TeamsFilesPolicy.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsFilesPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.psm1 index 3e8ad626f1..7ab2957bbc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.psm1 @@ -44,7 +44,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' -InboundParameters $PSBoundParameters @@ -115,6 +119,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -174,7 +179,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -286,7 +295,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -337,7 +350,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $InformationPreference = 'Continue' $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' -InboundParameters $PSBoundParameters @@ -397,6 +414,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } #$results = Get-TargetResource @getParams $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.schema.mof index 4ab2928fbc..843fae438a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGroupPolicyAssignment/MSFT_TeamsGroupPolicyAssignment.schema.mof @@ -11,5 +11,5 @@ class MSFT_TeamsGroupPolicyAssignment : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.psm1 index d0d0006666..b78bd59890 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.psm1 @@ -27,7 +27,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Guest Calling' @@ -62,6 +66,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return $result } @@ -105,7 +110,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Guest Calling' @@ -131,6 +140,7 @@ function Set-TargetResource $SetParams.Remove('ApplicationId') | Out-Null $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null if ($AllowPrivateCalling -ne $CurrentValues.AllowPrivateCalling) { @@ -167,7 +177,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -220,7 +234,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -247,6 +265,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.schema.mof index 3772c53927..3afdd7aebe 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestCallingConfiguration/MSFT_TeamsGuestCallingConfiguration.schema.mof @@ -7,5 +7,5 @@ class MSFT_TeamsGuestCallingConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.psm1 index 519d9a1aae..60f8ca4e9b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.psm1 @@ -41,7 +41,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Guest Meeting settings' @@ -79,6 +83,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return $result } @@ -136,7 +141,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Guest Meeting settings' @@ -161,6 +170,7 @@ function Set-TargetResource $SetParams.Remove('ApplicationId') | Out-Null $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null Set-CsTeamsGuestMeetingConfiguration @SetParams } @@ -208,7 +218,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -261,7 +275,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -287,6 +305,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.schema.mof index e2e12a3836..98510798c3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMeetingConfiguration/MSFT_TeamsGuestMeetingConfiguration.schema.mof @@ -10,4 +10,5 @@ class MSFT_TeamsGuestMeetingConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.psm1 index 9127c65f31..a9d87c654f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.psm1 @@ -60,7 +60,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Guest Messaging settings' @@ -103,6 +107,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -178,7 +183,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Guest Messaging settings' @@ -191,6 +200,7 @@ function Set-TargetResource $inputValues.Remove('TenantId') | Out-Null $inputValues.Remove('CertificateThumbprint') | Out-Null $inputValues.Remove('Identity') | Out-Null + $inputValues.Remove('ManagedIdentity') | Out-Null foreach ($item in $inputValues) { if ([System.String]::IsNullOrEmpty($item.Value)) @@ -285,7 +295,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -338,7 +352,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -365,6 +383,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.schema.mof index 564f2024b2..68dd36fdaf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsGuestMessagingConfiguration/MSFT_TeamsGuestMessagingConfiguration.schema.mof @@ -15,5 +15,5 @@ class MSFT_TeamsGuestMessagingConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.psm1 index c2061ace70..9171d265f6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.psm1 @@ -59,7 +59,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -102,6 +106,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -177,7 +182,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -312,7 +321,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -437,7 +450,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.schema.mof index e4fe6f5bc7..6293962713 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsIPPhonePolicy/MSFT_TeamsIPPhonePolicy.schema.mof @@ -14,4 +14,5 @@ class MSFT_TeamsIPPhonePolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.psm1 index ee8427cd77..befd645d38 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.psm1 @@ -47,7 +47,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Meeting Broadcast' @@ -88,6 +92,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -150,7 +155,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Meeting Broadcast' @@ -175,6 +184,7 @@ function Set-TargetResource $SetParams.Remove('ApplicationId') | Out-Null $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null Set-CsTeamsMeetingBroadcastConfiguration @SetParams } @@ -228,7 +238,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -286,7 +300,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -313,6 +331,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } Add-ConfigurationDataEntry -Node 'NonNodeData' -Key 'SdnApiToken' -Value '**********'` -Description 'API Token for the Teams SDN Provider for Meeting Broadcast' diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.schema.mof index 52109ae99a..fdb7c10fb0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastConfiguration/MSFT_TeamsMeetingBroadcastConfiguration.schema.mof @@ -12,5 +12,5 @@ class MSFT_TeamsMeetingBroadcastConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.psm1 index 8210eeb73e..442fda7f9c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.psm1 @@ -45,7 +45,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting configuration of Teams Meeting Broadcast Policy {$Identity}" @@ -84,6 +88,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } return $nullReturn @@ -146,7 +151,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting configuration of Teams Meeting Broadcast Policy {$Identity}" @@ -189,6 +198,7 @@ function Set-TargetResource $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null $SetParams.Remove('Ensure') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $currentValues.Ensure -eq 'Absent') { @@ -251,7 +261,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -304,7 +318,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -336,6 +354,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } Write-Host " |---[$i/$($policies.Length)] $($policy.Identity)" -NoNewline $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.schema.mof index 5b4583b65d..6b21bfafc8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingBroadcastPolicy/MSFT_TeamsMeetingBroadcastPolicy.schema.mof @@ -11,5 +11,5 @@ class MSFT_TeamsMeetingBroadcastPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.psm1 index 20d7c924b9..726f895170 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.psm1 @@ -78,7 +78,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Meeting' @@ -125,6 +129,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -218,7 +223,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Meetings' @@ -243,6 +252,7 @@ function Set-TargetResource $SetParams.Remove('ApplicationId') | Out-Null $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null Set-CsTeamsMeetingConfiguration @SetParams } @@ -327,7 +337,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -380,7 +394,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -407,6 +425,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.schema.mof index 8855a61442..96b6f0e085 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingConfiguration/MSFT_TeamsMeetingConfiguration.schema.mof @@ -19,5 +19,5 @@ class MSFT_TeamsMeetingConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.schema.mof index e5d68caeac..508e1f3cba 100644 Binary files a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.schema.mof and b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.schema.mof differ diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.psm1 index 8f886a2671..6ce43a6417 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.psm1 @@ -131,7 +131,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Messaging Policy' @@ -202,6 +206,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } } @@ -349,7 +354,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Messaging Policy' @@ -377,6 +386,7 @@ function Set-TargetResource $SetParams.Remove('TenantId') | Out-Null $SetParams.Remove('CertificateThumbprint') | Out-Null $SetParams.Remove('Ensure') | Out-Null + $SetParams.Remove('ManagedIdentity') | Out-Null if ($curPolicy.Ensure -eq 'Absent' -and 'Present' -eq $Ensure ) { @@ -525,7 +535,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -580,7 +594,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -622,6 +640,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.schema.mof index 0dca96be54..39d3ee98eb 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMessagingPolicy/MSFT_TeamsMessagingPolicy.schema.mof @@ -32,5 +32,5 @@ class MSFT_TeamsMessagingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.psm1 index 30ff10393e..173998fe7f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.psm1 @@ -46,7 +46,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -86,6 +90,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity } return [System.Collections.Hashtable] $results } @@ -148,7 +153,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -270,7 +279,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -395,7 +408,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.schema.mof index 30bf8f182c..6882b2a8aa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMobilityPolicy/MSFT_TeamsMobilityPolicy.schema.mof @@ -11,4 +11,5 @@ class MSFT_TeamsMobilityPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.psm1 index abe450cad1..1bd6fdb1e2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.psm1 @@ -39,7 +39,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -78,6 +82,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -133,7 +138,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -248,7 +257,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -373,7 +386,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.schema.mof index 9997e9e405..66a0f9b11c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsNetworkRoamingPolicy/MSFT_TeamsNetworkRoamingPolicy.schema.mof @@ -10,4 +10,5 @@ class MSFT_TeamsNetworkRoamingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.psm1 index 73d5f8a1a2..415e797ad6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Online Voice User $($Identity)" @@ -91,6 +95,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -141,7 +146,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting Teams Online Voice User {$Identity}" @@ -211,7 +220,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -264,7 +277,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -301,6 +318,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.schema.mof index 3f96b62e2a..ea7a87d165 100644 Binary files a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.schema.mof and b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoiceUser/MSFT_TeamsOnlineVoiceUser.schema.mof differ diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.psm1 index da9b46732c..56c1a832b8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.psm1 @@ -59,7 +59,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Online Voicemail Policy $($Identity)" @@ -108,6 +112,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -182,7 +187,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting Teams Online Voicemail Policy' @@ -210,6 +219,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null # Convert the MaximumRecordingLength back to a timespan object. $timespan = [TimeSpan]$MaximumRecordingLength @@ -295,7 +305,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -348,7 +362,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -380,6 +398,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.schema.mof index 9a009e7cd6..550bbcbf5c 100644 Binary files a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.schema.mof and b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailPolicy/MSFT_TeamsOnlineVoicemailPolicy.schema.mof differ diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.psm1 index 65d4d988f5..d263afaa81 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.psm1 @@ -68,7 +68,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Online Voicemail User Settings $($Identity)" @@ -118,6 +122,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -201,7 +206,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting Teams Online Voicemail User Settings' @@ -229,6 +238,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null try { @@ -314,7 +324,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -367,7 +381,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -403,6 +421,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity } $Results = Get-TargetResource @Params @@ -422,7 +441,7 @@ function Export-TargetResource Write-Host $Global:M365DSCEmojiGreenCheckMark $i++ } - return $dscContent + return $dscContent.ToString() } catch { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.schema.mof index 3322c261c3..e12b1d3414 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOnlineVoicemailUserSettings/MSFT_TeamsOnlineVoicemailUserSettings.schema.mof @@ -17,4 +17,5 @@ class MSFT_TeamsOnlineVoicemailUserSettings : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOrgWideAppSettings/MSFT_TeamsOrgWideAppSettings.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOrgWideAppSettings/MSFT_TeamsOrgWideAppSettings.schema.mof index 761c82cf5c..9bc8235bd1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOrgWideAppSettings/MSFT_TeamsOrgWideAppSettings.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsOrgWideAppSettings/MSFT_TeamsOrgWideAppSettings.schema.mof @@ -4,5 +4,5 @@ class MSFT_TeamsOrgWideAppSettings : OMI_BaseResource [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"),ValueMap{"Yes"},Values{"Yes"}] String IsSingleInstance; [Write, Description("Determines whether or not to allow interaction with custom apps.")] Boolean IsSideloadedAppsInteractionEnabled; [Write, Description("Credentials of the Teams Admin"), EmbeddedInstance("MSFT_Credential")] string Credential; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.psm1 index 5d20d0bcbd..5459028083 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.psm1 @@ -27,7 +27,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting Global PSTN Usage(s)' @@ -77,6 +81,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -119,7 +124,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting PSTN Usage' @@ -147,6 +156,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -189,7 +199,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -242,7 +256,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -282,6 +300,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.schema.mof index cd64eb15eb..d02a0a1f3c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsPstnUsage/MSFT_TeamsPstnUsage.schema.mof @@ -7,4 +7,5 @@ class MSFT_TeamsPstnUsage : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.psm1 index bdab72fdf6..ccbc63bbab 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.psm1 @@ -58,7 +58,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -102,6 +106,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -176,7 +181,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -316,7 +325,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -442,7 +455,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.schema.mof index 1216e56a1f..29fe2b1e64 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsShiftsPolicy/MSFT_TeamsShiftsPolicy.schema.mof @@ -14,4 +14,5 @@ class MSFT_TeamsShiftsPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 index 98f85fa961..f100145246 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 @@ -119,7 +119,11 @@ function Get-TargetResource [Parameter()] [System.Management.Automation.PSCredential] - $Credential + $Credential, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting configuration of Team $DisplayName" @@ -205,6 +209,7 @@ function Get-TargetResource AllowDeleteChannels = $team.AllowDeleteChannels ShowInTeamsSearchAndSuggestions = $team.ShowInTeamsSearchAndSuggestions Ensure = 'Present' + ManagedIdentity = $ManagedIdentity.IsPresent } if ($ConnectionMode.StartsWith('ServicePrincipal')) @@ -351,7 +356,11 @@ function Set-TargetResource [Parameter()] [System.Management.Automation.PSCredential] - $Credential + $Credential, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting configuration of Team $DisplayName" @@ -374,6 +383,7 @@ function Set-TargetResource $CurrentParameters = $PSBoundParameters $CurrentParameters.Remove('Ensure') | Out-Null + $CurrentParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and ($team.Ensure -eq 'Present')) { @@ -596,7 +606,11 @@ function Test-TargetResource [Parameter()] [System.Management.Automation.PSCredential] - $Credential + $Credential, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -660,7 +674,11 @@ function Export-TargetResource [Parameter()] [System.Management.Automation.PSCredential] - $Credential + $Credential, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' -InboundParameters $PSBoundParameters @@ -701,6 +719,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.schema.mof index c2a1fe5950..72270fe13c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.schema.mof @@ -29,5 +29,5 @@ class MSFT_TeamsTeam : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.psm1 index db316f81cc..8ed0268d9e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Teams Calling Policy {$Identity}" @@ -92,6 +96,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -142,7 +147,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -168,6 +177,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null $hideTemplatesValues = @() if ($null -ne $HiddenTemplates) @@ -236,7 +246,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -258,7 +272,6 @@ function Test-TargetResource Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" $ValuesToCheck = $PSBoundParameters - $ValuesToCheck.Remove('Credential') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` @@ -290,7 +303,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -323,6 +340,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.schema.mof index 044b229f6a..ec095f5563 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTemplatesPolicy/MSFT_TeamsTemplatesPolicy.schema.mof @@ -9,5 +9,5 @@ class MSFT_TeamsTemplatesPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 index 85f29ebd0b..3d7c71a490 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 @@ -50,7 +50,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Getting configuration of Teams Tenant Dial Plan' @@ -101,6 +105,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } return $result @@ -168,7 +173,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting configuration of Teams Guest Calling' @@ -207,11 +216,12 @@ function Set-TargetResource } $NewParameters = $PSBoundParameters - $NewParameters.Remove('Credential') - $NewParameters.Remove('ApplicationId') - $NewParameters.Remove('TenantId') - $NewParameters.Remove('CertificateThumbprint') - $NewParameters.Remove('Ensure') + $NewParameters.Remove('Credential') | Out-Null + $NewParameters.Remove('ApplicationId') | Out-Null + $NewParameters.Remove('TenantId') | Out-Null + $NewParameters.Remove('CertificateThumbprint') | Out-Null + $NewParameters.Remove('Ensure') | Out-Null + $NewParameters.Remove('ManagedIdentity') | Out-Null $NewParameters.NormalizationRules = @{Add = $AllRules } New-CsTenantDialPlan @NewParameters @@ -220,9 +230,10 @@ function Set-TargetResource { Write-Verbose -Message "Tenant Dial Plan {$Identity} already exists. Updating it." $SetParameters = $PSBoundParameters - $SetParameters.Remove('Credential') - $SetParameters.Remove('Ensure') - $SetParameters.Remove('SimpleName') + $SetParameters.Remove('Credential') | Out-Null + $SetParameters.Remove('Ensure') | Out-Null + $SetParameters.Remove('SimpleName') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null $desiredRules = @() foreach ($rule in $NormalizationRules) @@ -352,7 +363,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -435,7 +450,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -468,6 +487,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $results = Get-TargetResource @params $results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.schema.mof index c9f4d44fe0..ced75f065d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.schema.mof @@ -22,5 +22,5 @@ class MSFT_TeamsTenantDialPlan : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.psm1 index 582fa43630..5a540e70a8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -73,6 +77,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -124,7 +129,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -235,7 +244,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -360,7 +373,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.schema.mof index c7b45b11e3..8bf1381aa4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkRegion/MSFT_TeamsTenantNetworkRegion.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsTenantNetworkRegion : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.psm1 index 68c4d63b7b..19ae116587 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.psm1 @@ -59,7 +59,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -103,6 +107,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -178,7 +183,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -313,7 +322,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -438,7 +451,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.schema.mof index 78a87dfbe0..9eeffd07f6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSite/MSFT_TeamsTenantNetworkSite.schema.mof @@ -15,4 +15,5 @@ class MSFT_TeamsTenantNetworkSite : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.psm1 index e662126d4d..aad8b6b03f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.psm1 @@ -39,7 +39,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -78,6 +82,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -133,7 +138,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -248,7 +257,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -374,6 +387,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.schema.mof index f685ed8b5e..d44c084553 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantNetworkSubnet/MSFT_TeamsTenantNetworkSubnet.schema.mof @@ -10,4 +10,5 @@ class MSFT_TeamsTenantNetworkSubnet : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.psm1 index a2782d3c9e..17a6d293e3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Get Teams Tenant Trusted IP Address settings' New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -75,6 +79,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -126,7 +131,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -237,7 +246,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -362,7 +375,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.schema.mof index c26d6194ce..fd6fca4c41 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantTrustedIPAddress/MSFT_TeamsTenantTrustedIPAddress.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsTenantTrustedIPAddress : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.psm1 index 68ddebee03..d1766a867f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.psm1 @@ -39,7 +39,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -78,6 +82,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -133,7 +138,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -248,7 +257,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -373,7 +386,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.schema.mof index f925b3dfdd..d9cd30c532 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTranslationRule/MSFT_TeamsTranslationRule.schema.mof @@ -10,4 +10,5 @@ class MSFT_TeamsTranslationRule : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.psm1 index 2f1287e0b7..80356fbeaf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.psm1 @@ -48,7 +48,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -89,6 +93,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -153,7 +158,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -277,7 +286,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -402,7 +415,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.schema.mof index 9977bc87f7..4ba32b75ef 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUnassignedNumberTreatment/MSFT_TeamsUnassignedNumberTreatment.schema.mof @@ -12,4 +12,5 @@ class MSFT_TeamsUnassignedNumberTreatment : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.psm1 index eb6d4351d5..01388d09ad 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.psm1 @@ -62,7 +62,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -109,6 +113,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } if (-not [System.String]::IsNullOrEmpty($policy.UpdateTimeOfDay)) { @@ -222,6 +227,7 @@ function Set-TargetResource $newParams.Remove('ApplicationId') | Out-Null $newParams.Remove('TenantId') | Out-Null $newParams.Remove('CertificateThumbprint') | Out-Null + $newParams.Remove('ManagedIdentity') | Out-Null New-CsTeamsUpdateManagementPolicy @newParams | Out-Null } @@ -234,6 +240,7 @@ function Set-TargetResource $setParams.Remove('ApplicationId') | Out-Null $setParams.Remove('TenantId') | Out-Null $setParams.Remove('CertificateThumbprint') | Out-Null + $setParams.Remove('ManagedIdentity') | Out-Null Set-CsTeamsUpdateManagementPolicy @setParams | Out-Null } @@ -309,7 +316,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -361,7 +372,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -399,6 +414,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $result = Get-TargetResource @params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.schema.mof index 2dc1712905..5efe8f1dbc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpdateManagementPolicy/MSFT_TeamsUpdateManagementPolicy.schema.mof @@ -15,4 +15,5 @@ class MSFT_TeamsUpdateManagementPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.psm1 index 74d1f38382..bbffb4d12f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.psm1 @@ -32,7 +32,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Checking the Teams Upgrade Configuration' @@ -66,6 +70,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -115,7 +120,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message 'Setting Teams Upgrade Configuration' @@ -141,6 +150,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null $SetParameters.Add("Identity", "Global") Write-Verbose -Message "Updating with Values: $(Convert-M365DscHashtableToString -Hashtable $SetParameters)" Set-CsTeamsUpgradeConfiguration @SetParameters @@ -180,7 +190,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -233,7 +247,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -260,6 +278,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.schema.mof index 2e856c7a33..eb81e91dbc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradeConfiguration/MSFT_TeamsUpgradeConfiguration.schema.mof @@ -8,5 +8,5 @@ class MSFT_TeamsUpgradeConfiguration : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 index 54e2a3962f..b6091dde22 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.psm1 @@ -30,7 +30,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -93,6 +97,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -138,7 +143,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -196,7 +205,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -248,7 +261,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -286,6 +303,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.schema.mof index 0883a63c50..6ca52b5f5e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUpgradePolicy/MSFT_TeamsUpgradePolicy.schema.mof @@ -8,5 +8,5 @@ class MSFT_TeamsUpgradePolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.psm1 index 1e2ca71be7..4d5400c0b5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.psm1 @@ -36,7 +36,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting configuration of member $User to Team $TeamName" @@ -98,6 +102,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -149,7 +154,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Setting configuration of member $User to Team $TeamName" @@ -180,6 +189,7 @@ function Set-TargetResource $CurrentParameters.Remove('TenantId') | Out-Null $CurrentParameters.Remove('CertificateThumbprint') | Out-Null $CurrentParameters.Remove('Ensure') | Out-Null + $CurrentParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present') { @@ -236,7 +246,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -294,7 +308,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $InformationPreference = 'Continue' $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' -InboundParameters $PSBoundParameters @@ -349,6 +367,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $results = Get-TargetResource @getParams $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.schema.mof index c410a721a6..438ae7d3f8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUser/MSFT_TeamsUser.schema.mof @@ -9,5 +9,5 @@ class MSFT_TeamsUser : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserCallingSettings/MSFT_TeamsUserCallingSettings.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserCallingSettings/MSFT_TeamsUserCallingSettings.schema.mof index d4cfae9d7a..86a7b83d7b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserCallingSettings/MSFT_TeamsUserCallingSettings.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserCallingSettings/MSFT_TeamsUserCallingSettings.schema.mof @@ -15,4 +15,5 @@ class MSFT_TeamsUserCallingSettings : OMI_BaseResource [Write, Description("The forwarding target. Supported types of values are ObjectId's, SIP addresses and phone numbers. For phone numbers we support the following types of formats: E.164 (+12065551234 or +1206555000;ext=1234) or non-E.164 like 1234.")] String ForwardingTarget; [Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; [Required, Description("Credentials of the Teams Global Admin."), EmbeddedInstance("MSFT_Credential")] String Credential; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.psm1 index 41cce1ab63..d734e595f5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.psm1 @@ -110,7 +110,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' -InboundParameters $PSBoundParameters @@ -164,6 +168,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -289,7 +294,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -543,7 +552,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -593,7 +606,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $InformationPreference = 'Continue' $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' -InboundParameters $PSBoundParameters @@ -638,6 +655,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $results = Get-TargetResource @getParams diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.schema.mof index 16ade2b961..55e494f727 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsUserPolicyAssignment/MSFT_TeamsUserPolicyAssignment.schema.mof @@ -28,5 +28,5 @@ class MSFT_TeamsUserPolicyAssignment : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.psm1 index 41e02cfed0..1fc10c12d8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -73,6 +77,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -124,7 +129,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -235,7 +244,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -360,7 +373,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.schema.mof index 1b528e8048..5eefcf581c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVdiPolicy/MSFT_TeamsVdiPolicy.schema.mof @@ -9,4 +9,5 @@ class MSFT_TeamsVdiPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.psm1 index c2699948a8..0e93d5c877 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.psm1 @@ -47,7 +47,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Voice Route {$Identity}" @@ -74,6 +78,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } try { @@ -97,6 +102,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -159,7 +165,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -220,6 +230,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -291,7 +302,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -344,7 +359,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $InformationPreference = 'Continue' @@ -379,6 +398,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.schema.mof index c0a6c75c3c..29611fefd0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoute/MSFT_TeamsVoiceRoute.schema.mof @@ -12,5 +12,5 @@ class MSFT_TeamsVoiceRoute : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.psm1 index 47d1e852e3..46d6aee02a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.psm1 @@ -35,7 +35,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) Write-Verbose -Message "Getting the Voice Routing Policy {$Identity}" @@ -78,6 +82,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } } catch @@ -128,7 +133,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) # Validate that the selected PSTN usages exist in the environment @@ -173,6 +182,7 @@ function Set-TargetResource $SetParameters.Remove('ApplicationId') | Out-Null $SetParameters.Remove('TenantId') | Out-Null $SetParameters.Remove('CertificateThumbprint') | Out-Null + $SetParameters.Remove('ManagedIdentity') | Out-Null if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent') { @@ -232,7 +242,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -285,7 +299,11 @@ function Export-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' ` -InboundParameters $PSBoundParameters @@ -318,6 +336,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.schema.mof index c99fb79939..d0821a50c5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsVoiceRoutingPolicy/MSFT_TeamsVoiceRoutingPolicy.schema.mof @@ -9,5 +9,5 @@ class MSFT_TeamsVoiceRoutingPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; - diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.psm1 index d205cf93fd..a19d66bff3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.psm1 @@ -55,7 +55,11 @@ function Get-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -98,6 +102,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint + ManagedIdentity = $ManagedIdentity.IsPresent } return [System.Collections.Hashtable] $results } @@ -169,7 +174,11 @@ function Set-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) New-M365DSCConnection -Workload 'MicrosoftTeams' ` @@ -300,7 +309,11 @@ function Test-TargetResource [Parameter()] [System.String] - $CertificateThumbprint + $CertificateThumbprint, + + [Parameter()] + [Switch] + $ManagedIdentity ) #Ensure the proper dependencies are installed in the current environment. @@ -425,7 +438,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - + ManagedIdentity = $ManagedIdentity.IsPresent } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.schema.mof index 935bc2e71f..147d08cdcf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsWorkloadPolicy/MSFT_TeamsWorkloadPolicy.schema.mof @@ -14,4 +14,5 @@ class MSFT_TeamsWorkloadPolicy : OMI_BaseResource [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; }; diff --git a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 index ed504505f0..9cc63defeb 100644 --- a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 +++ b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 @@ -86,7 +86,7 @@ }, @{ ModuleName = "MSCloudLoginAssistant" - RequiredVersion = "1.1.7" + RequiredVersion = "1.1.10" }, @{ ModuleName = 'PnP.PowerShell' diff --git a/Modules/Microsoft365DSC/Examples/Resources/AADSecurityDefaults/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/AADSecurityDefaults/2-Update.ps1 similarity index 95% rename from Modules/Microsoft365DSC/Examples/Resources/AADSecurityDefaults/3-Remove.ps1 rename to Modules/Microsoft365DSC/Examples/Resources/AADSecurityDefaults/2-Update.ps1 index 3082922b75..8ed7979197 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/AADSecurityDefaults/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/AADSecurityDefaults/2-Update.ps1 @@ -19,7 +19,7 @@ Configuration Example Credential = $Credscredential; Description = "Security defaults is a set of basic identity security mechanisms recommended by Microsoft. When enabled, these recommendations will be automatically enforced in your organization. Administrators and users will be better protected from common identity related attacks."; DisplayName = "Security Defaults"; - IsEnabled = $True; + IsEnabled = $False; IsSingleInstance = "Yes"; } } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/1-Create.ps1 index e2f6aeeba4..03b2094ac1 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/1-Create.ps1 @@ -18,13 +18,7 @@ Configuration Example EXOAntiPhishRule 'ConfigureAntiPhishRule' { Identity = "Test Rule" - ExceptIfSentToMemberOf = $null - ExceptIfSentTo = $null - SentTo = $null - ExceptIfRecipientDomainIs = $null - Comments = $null AntiPhishPolicy = "Our Rule" - RecipientDomainIs = $null Enabled = $True SentToMemberOf = @("executives@$Domain") Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/2-Update.ps1 index 210bb04776..622f37e92b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAntiPhishRule/2-Update.ps1 @@ -18,13 +18,8 @@ Configuration Example EXOAntiPhishRule 'ConfigureAntiPhishRule' { Identity = "Test Rule" - ExceptIfSentToMemberOf = $null - ExceptIfSentTo = $null - SentTo = $null - ExceptIfRecipientDomainIs = $null Comments = "This is an updated comment." # Updated Property AntiPhishPolicy = "Our Rule" - RecipientDomainIs = $null Enabled = $True SentToMemberOf = @("executives@$Domain") Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/1-Create.ps1 index 0fb2f2f613..1d2cade88f 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/1-Create.ps1 @@ -7,11 +7,12 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' { - UserName = "AdeleV" + UserName = "AdeleV@$Domain" AuthenticationPolicyName = "Block Basic Auth" Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/2-Update.ps1 deleted file mode 100644 index 878bf3ebe1..0000000000 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/2-Update.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - $Domain = $Credscredential.Username.Split('@')[1] - node localhost - { - EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' - { - UserName = "AdeleV" - AuthenticationPolicyName = "Test Policy" # Updaqted Property - Ensure = "Present" - Credential = $Credscredential - } - } -} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/3-Remove.ps1 index becf7194b5..f1e7abdcd2 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAuthenticationPolicyAssignment/3-Remove.ps1 @@ -7,11 +7,12 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' { - UserName = "AdeleV" + UserName = "AdeleV@$Domain" AuthenticationPolicyName = "Test Policy" Ensure = "Absent" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 index ab8f6d89fa..388e65eab4 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 @@ -19,9 +19,10 @@ Configuration Example EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFB' + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'o365dsc.onmicrosoft.com' Ensure = 'Present' Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 index 1dcd3fef7a..957581c0cc 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 @@ -19,9 +19,10 @@ Configuration Example EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFBBasic' # Updated Property + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'contoso.onmicrosoft.com' # Updated Property Ensure = 'Present' Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOCASMailboxSettings/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOCASMailboxSettings/2-Update.ps1 index 910c0a15a4..6bf76b701e 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOCASMailboxSettings/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOCASMailboxSettings/2-Update.ps1 @@ -14,6 +14,7 @@ Configuration Example Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOCASMailboxSettings 'AdeleVCasMailboxSettings' @@ -22,10 +23,10 @@ Configuration Example ActiveSyncBlockedDeviceIDs = @() ActiveSyncDebugLogging = $False ActiveSyncEnabled = $True - ActiveSyncMailboxPolicy = 'Demo EXO Mobile Device Policy Default' + ActiveSyncMailboxPolicy = 'Default' ActiveSyncSuppressReadReceipt = $False EwsEnabled = $True - Identity = 'AdeleV' + Identity = "admin@$Domain" ImapEnabled = $True # Updated Property ImapForceICalForCalendarRetrievalOption = $False ImapMessagesRetrievalMimeFormat = 'BestBodyFormat' @@ -36,7 +37,7 @@ Configuration Example OutlookMobileEnabled = $True OWAEnabled = $True OWAforDevicesEnabled = $True - OwaMailboxPolicy = 'OwaMailboxPolicy-Default' + OwaMailboxPolicy = 'OwaMailboxPolicy-Integration' PopEnabled = $False PopForceICalForCalendarRetrievalOption = $True PopMessagesRetrievalMimeFormat = 'BestBodyFormat' diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/2-Update.ps1 index 84ae10d81a..9588fd7db3 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/2-Update.ps1 @@ -42,7 +42,7 @@ Configuration Example EnforceSchedulingHorizon = $True; Ensure = "Present"; ForwardRequestsToDelegates = $True; - Identity = "AdeleV"; + Identity = "admin@$Domain"; MaximumConflictInstances = 0; MaximumDurationInMinutes = 1440; MinimumDurationInMinutes = 0; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODataEncryptionPolicy/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODataEncryptionPolicy/1-Create.ps1 deleted file mode 100644 index 4f7d7e5e58..0000000000 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODataEncryptionPolicy/1-Create.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -<# -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. -#> - -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXODataEncryptionPolicy 'ConfigureDataEncryptionPolicy' - { - Identity = 'US Mailboxes' - Name = 'All US Mailboxes' - Description = 'All Mailboxes of users in the US' - Enabled = $true - Ensure = "Present" - Credential = $Credscredential - } - } -} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODataEncryptionPolicy/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODataEncryptionPolicy/2-Update.ps1 deleted file mode 100644 index b9f21cf1a7..0000000000 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODataEncryptionPolicy/2-Update.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -<# -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. -#> - -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXODataEncryptionPolicy 'ConfigureDataEncryptionPolicy' - { - Identity = 'US Mailboxes' - Name = 'All US Mailboxes' - Description = 'All Mailboxes of users in the US. Updated' # Updated Property - Enabled = $true - Ensure = "Present" - Credential = $Credscredential - } - } -} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 index 7b5327e6d2..ce9a53e436 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 @@ -31,7 +31,6 @@ Configuration Example ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 index 2e59ecff8e..06744f178c 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 @@ -31,7 +31,6 @@ Configuration Example ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/1-Create.ps1 index 76dca250e0..5f427b2eaa 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/1-Create.ps1 @@ -12,12 +12,13 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXODkimSigningConfig 'ConfigureDKIMSigning' { KeySize = 1024 - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain HeaderCanonicalization = "Relaxed" Enabled = $True BodyCanonicalization = "Relaxed" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/2-Update.ps1 index f9d8760554..519d24fe0a 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/2-Update.ps1 @@ -12,12 +12,13 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXODkimSigningConfig 'ConfigureDKIMSigning' { KeySize = 1024 - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain HeaderCanonicalization = "Relaxed" Enabled = $False # Updated Property BodyCanonicalization = "Relaxed" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/3-Remove.ps1 index 39c018e8b5..c37c0a7f6f 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODkimSigningConfig/3-Remove.ps1 @@ -12,11 +12,12 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXODkimSigningConfig 'ConfigureDKIMSigning' { - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain Ensure = "Absent" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOEmailAddressPolicy/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOEmailAddressPolicy/2-Update.ps1 index 59a62ba67e..3b02fb5f8a 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOEmailAddressPolicy/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOEmailAddressPolicy/2-Update.ps1 @@ -20,8 +20,8 @@ Configuration Example Name = "Integration Policy" EnabledEmailAddressTemplates = @("SMTP:@$Domain") EnabledPrimarySMTPAddressTemplate = "@$Domain" - ManagedByFilter = "" - Priority = 2 # Updated Property + ManagedByFilter = "Department -eq 'Sales'" # Updated Property + Priority = 1 Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOGlobalAddressList/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOGlobalAddressList/1-Create.ps1 index 88f004d8e2..8434d79874 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOGlobalAddressList/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOGlobalAddressList/1-Create.ps1 @@ -21,6 +21,7 @@ Configuration Example ConditionalCompany = "Contoso" ConditionalDepartment = "Human Resources" ConditionalStateOrProvince = "Washington" + IncludedRecipients = 'AllRecipients' Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/1-Create.ps1 deleted file mode 100644 index dc5cfd26cb..0000000000 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/1-Create.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -<# -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. -#> - -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' - { - Identity = "Integration Policy" - AdminDisplayName = "" - EnableSafeList = $False - IPAllowList = @() - IPBlockList = @() - MakeDefault = $False - Ensure = "Present" - Credential = $Credscredential - } - } -} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/2-Update.ps1 index 5f06631889..dbad190990 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/2-Update.ps1 @@ -16,12 +16,12 @@ Configuration Example { EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' { - Identity = "Integration Policy" + Identity = "Default" AdminDisplayName = "" EnableSafeList = $True # Updated Property IPAllowList = @() IPBlockList = @() - MakeDefault = $False + MakeDefault = $True Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/3-Remove.ps1 deleted file mode 100644 index dcba8d2b18..0000000000 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedConnectionFilterPolicy/3-Remove.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -<# -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. -#> - -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' - { - Identity = "Integration Policy" - Ensure = "Absent" - Credential = $Credscredential - } - } -} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/1-Create.ps1 index 8ad924b9f0..28551c5cb8 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/1-Create.ps1 @@ -22,12 +22,8 @@ Configuration Example BulkSpamAction = "MoveToJmf" BulkThreshold = 7 DownloadLink = $False - EnableEndUserSpamNotifications = $False EnableLanguageBlockList = $False EnableRegionBlockList = $False - EndUserSpamNotificationCustomSubject = "" - EndUserSpamNotificationFrequency = 3 - EndUserSpamNotificationLanguage = "Default" HighConfidencePhishAction = "Quarantine" HighConfidenceSpamAction = "MoveToJmf" IncreaseScoreWithBizOrInfoUrls = "Off" @@ -36,7 +32,7 @@ Configuration Example IncreaseScoreWithRedirectToOtherPort = "Off" InlineSafetyTipsEnabled = $True LanguageBlockList = @() - MakeDefault = $True + MakeDefault = $False MarkAsSpamBulkMail = "On" MarkAsSpamEmbedTagsInHtml = "Off" MarkAsSpamEmptyMessages = "Off" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/2-Update.ps1 index 68f54d10fd..836aef841f 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterPolicy/2-Update.ps1 @@ -22,12 +22,8 @@ Configuration Example BulkSpamAction = "MoveToJmf" BulkThreshold = 7 DownloadLink = $True # Updated Property - EnableEndUserSpamNotifications = $False EnableLanguageBlockList = $False EnableRegionBlockList = $False - EndUserSpamNotificationCustomSubject = "" - EndUserSpamNotificationFrequency = 3 - EndUserSpamNotificationLanguage = "Default" HighConfidencePhishAction = "Quarantine" HighConfidenceSpamAction = "MoveToJmf" IncreaseScoreWithBizOrInfoUrls = "Off" @@ -36,7 +32,7 @@ Configuration Example IncreaseScoreWithRedirectToOtherPort = "Off" InlineSafetyTipsEnabled = $True LanguageBlockList = @() - MakeDefault = $True + MakeDefault = $False MarkAsSpamBulkMail = "On" MarkAsSpamEmbedTagsInHtml = "Off" MarkAsSpamEmptyMessages = "Off" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/1-Create.ps1 index 304e2d1e99..af70c51640 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/1-Create.ps1 @@ -13,14 +13,16 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" Comments = "Applies to all users, except when member of HR group" Enabled = $True - ExceptIfSentToMemberOf = "Contoso Human Resources" + ExceptIfSentToMemberOf = "LegalTeam@$Domain" + RecipientDomainIs = @('contoso.com') HostedContentFilterPolicy = "Integration CFP" Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/2-Update.ps1 index 4c0bbf0035..b109c3907f 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/2-Update.ps1 @@ -13,14 +13,16 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" Comments = "Applies to all users, except when member of HR group" Enabled = $False # Updated Property - ExceptIfSentToMemberOf = "Contoso Human Resources" + ExceptIfSentToMemberOf = "LegalTeam@$Domain" + RecipientDomainIs = @('contoso.com') HostedContentFilterPolicy = "Integration CFP" Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/3-Remove.ps1 index 4af57b4f29..46aa815857 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedContentFilterRule/3-Remove.ps1 @@ -17,7 +17,7 @@ Configuration Example { EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" HostedContentFilterPolicy = "Integration CFP" Ensure = "Absent" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/1-Create.ps1 index b2680a0974..d9db058889 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/1-Create.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' @@ -20,7 +21,8 @@ Configuration Example Identity = "Contoso Executives" Comments = "Does not apply to Executives" Enabled = $True - ExceptIfFrom = "John Smith" + ExceptIfFrom = "AdeleV@$Domain" + FromMemberOf = "Executives@$Domain" HostedOutboundSpamFilterPolicy = "Integration SFP" Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/2-Update.ps1 index 4d7ae70dd0..15fa53328c 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/2-Update.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' @@ -20,7 +21,8 @@ Configuration Example Identity = "Contoso Executives" Comments = "Does not apply to Executives" Enabled = $False # Updated Property - ExceptIfFrom = "John Smith" + ExceptIfFrom = "AdeleV@$Domain" + FromMemberOf = "Executives@$Domain" HostedOutboundSpamFilterPolicy = "Integration SFP" Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/3-Remove.ps1 index fd568fae34..261f1ffc0e 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOHostedOutboundSpamFilterRule/3-Remove.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/1-Create.ps1 index a08678dd8b..e8524e45e6 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/1-Create.ps1 @@ -17,16 +17,15 @@ Configuration Example { EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" - CloudServicesMailEnabled = $True - Comment = "Inbound connector for Contoso" + Identity = "Integration Inbound Connector" + CloudServicesMailEnabled = $False + Comment = "Inbound connector for Integration" ConnectorSource = "Default" - ConnectorType = "OnPremises" + ConnectorType = "Partner" Enabled = $True RequireTls = $True SenderDomains = "*.contoso.com" TlsSenderCertificateName = "contoso.com" - TreatMessagesAsInternal = $True Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/2-Update.ps1 index 7a38b9078b..07c3c4cabd 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/2-Update.ps1 @@ -17,16 +17,15 @@ Configuration Example { EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" - CloudServicesMailEnabled = $True - Comment = "Inbound connector for Contoso" + Identity = "Integration Inbound Connector" + CloudServicesMailEnabled = $False + Comment = "Inbound connector for Integration" ConnectorSource = "Default" - ConnectorType = "OnPremises" + ConnectorType = "Partner" Enabled = $False # Updated Property RequireTls = $True SenderDomains = "*.contoso.com" TlsSenderCertificateName = "contoso.com" - TreatMessagesAsInternal = $True Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/3-Remove.ps1 index 974357ff51..9b30be3986 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOInboundConnector/3-Remove.ps1 @@ -17,7 +17,7 @@ Configuration Example { EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" + Identity = "Integration Inbound Connector" Ensure = "Absent" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 index f670d356e4..141cb1aa07 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 @@ -18,7 +18,7 @@ Configuration Example EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $True Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 index 34b31fcc80..0fc17035db 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 @@ -18,7 +18,7 @@ Configuration Example EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $False # Updated Property Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/1-Create.ps1 index a4577146ab..6a804d5c63 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/1-Create.ps1 @@ -28,7 +28,7 @@ Configuration Example ModeratedBy = @() ModerationEnabled = $false Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $true CustomAttribute1 = 'Custom Value 1' diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/2-Update.ps1 index c9b69b8bec..d6dae3e389 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/2-Update.ps1 @@ -28,7 +28,7 @@ Configuration Example ModeratedBy = @() ModerationEnabled = $false Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $false # Updated Property CustomAttribute1 = 'Custom Value 1' diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/3-Remove.ps1 index f84f309064..9c00cbf291 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOMailContact/3-Remove.ps1 @@ -23,7 +23,7 @@ Configuration Example Ensure = 'Absent' ExternalEmailAddress = 'SMTP:test@tailspintoys.com' Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $false # Updated Property CustomAttribute1 = 'Custom Value 1' diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/1-Create.ps1 index 86dac1533c..5be4191d19 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/1-Create.ps1 @@ -12,13 +12,14 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRole 'ConfigureManagementRole' { Name = "MyDisplayName" Description = "" - Parent = "contoso.onmicrosoft.com\MyProfileInformation" + Parent = "$Domain\MyProfileInformation" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/2-Update.ps1 index 512cd43c77..d6094d3dca 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRole/2-Update.ps1 @@ -12,13 +12,14 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRole 'ConfigureManagementRole' { Name = "MyDisplayName" Description = "Updated Description" # Updated Property - Parent = "contoso.onmicrosoft.com\MyProfileInformation" + Parent = "$Domain\MyProfileInformation" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/1-Create.ps1 index aee17ea1b5..38bf4d1041 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/1-Create.ps1 @@ -12,6 +12,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRoleAssignment 'AssignManagementRole' @@ -20,7 +21,7 @@ Configuration Example Ensure = "Present"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AdeleV"; + User = "AdeleV@$Domain"; } } } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/2-Update.ps1 index 76465f6366..9737099842 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/2-Update.ps1 @@ -12,6 +12,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRoleAssignment 'AssignManagementRole' @@ -20,7 +21,7 @@ Configuration Example Ensure = "Present"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AlexW"; # Updated Property + User = "AlexW@$Domain"; # Updated Property } } } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/3-Remove.ps1 index 27ba43c715..e1990e8efd 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOManagementRoleAssignment/3-Remove.ps1 @@ -12,6 +12,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRoleAssignment 'AssignManagementRole' @@ -20,7 +21,7 @@ Configuration Example Ensure = "Absent"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AlexW"; # Updated Property + User = "AlexW@$Domain"; # Updated Property } } } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/1-Create.ps1 index ce73e90fb1..d59a79deae 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/1-Create.ps1 @@ -20,7 +20,6 @@ Configuration Example { Name = "Integration Address Book" AddressLists = @('\Offline Global Address List') - ConfiguredAttributes = @('OfficeLocation, ANR', 'ProxyAddresses, ANR', 'PhoneticGivenName, ANR', 'GivenName, ANR', 'PhoneticSurname, ANR', 'Surname, ANR', 'Account, ANR', 'PhoneticDisplayName, ANR', 'UserInformationDisplayName, ANR', 'ExternalMemberCount, Value', 'TotalMemberCount, Value', 'ModerationEnabled, Value', 'DelivContLength, Value', 'MailTipTranslations, Value', 'ObjectGuid, Value', 'IsOrganizational, Value', 'HabSeniorityIndex, Value', 'DisplayTypeEx, Value', 'SimpleDisplayNameAnsi, Value', 'HomeMdbA, Value', 'Certificate, Value', 'UserSMimeCertificate, Value', 'UserCertificate, Value', 'Comment, Value', 'PagerTelephoneNumber, Value', 'AssistantTelephoneNumber, Value', 'MobileTelephoneNumber, Value', 'PrimaryFaxNumber, Value', 'Home2TelephoneNumberMv, Value', 'Business2TelephoneNumberMv, Value', 'HomeTelephoneNumber, Value', 'TargetAddress, Value', 'PhoneticDepartmentName, Value', 'DepartmentName, Value', 'Assistant, Value', 'PhoneticCompanyName, Value', 'CompanyName, Value', 'Title, Value', 'Country, Value', 'PostalCode, Value', 'StateOrProvince, Value', 'Locality, Value', 'StreetAddress, Value', 'Initials, Value', 'BusinessTelephoneNumber, Value', 'SendRichInfo, Value', 'ObjectType, Value', 'DisplayType, Value', 'RejectMessagesFromDLMembers, Indicator', 'AcceptMessagesOnlyFromDLMembers, Indicator', 'RejectMessagesFrom, Indicator', 'AcceptMessagesOnlyFrom, Indicator', 'UmSpokenName, Indicator', 'ThumbnailPhoto, Indicator') DiffRetentionPeriod = "30" IsDefault = $true Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/2-Update.ps1 index a6e6f375cf..3a05445e78 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOOfflineAddressBook/2-Update.ps1 @@ -20,7 +20,6 @@ Configuration Example { Name = "Integration Address Book" AddressLists = @('\Offline Global Address List') - ConfiguredAttributes = @('OfficeLocation, ANR', 'ProxyAddresses, ANR', 'PhoneticGivenName, ANR', 'GivenName, ANR', 'PhoneticSurname, ANR', 'Surname, ANR', 'Account, ANR', 'PhoneticDisplayName, ANR', 'UserInformationDisplayName, ANR', 'ExternalMemberCount, Value', 'TotalMemberCount, Value', 'ModerationEnabled, Value', 'DelivContLength, Value', 'MailTipTranslations, Value', 'ObjectGuid, Value', 'IsOrganizational, Value', 'HabSeniorityIndex, Value', 'DisplayTypeEx, Value', 'SimpleDisplayNameAnsi, Value', 'HomeMdbA, Value', 'Certificate, Value', 'UserSMimeCertificate, Value', 'UserCertificate, Value', 'Comment, Value', 'PagerTelephoneNumber, Value', 'AssistantTelephoneNumber, Value', 'MobileTelephoneNumber, Value', 'PrimaryFaxNumber, Value', 'Home2TelephoneNumberMv, Value', 'Business2TelephoneNumberMv, Value', 'HomeTelephoneNumber, Value', 'TargetAddress, Value', 'PhoneticDepartmentName, Value', 'DepartmentName, Value', 'Assistant, Value', 'PhoneticCompanyName, Value', 'CompanyName, Value', 'Title, Value', 'Country, Value', 'PostalCode, Value', 'StateOrProvince, Value', 'Locality, Value', 'StreetAddress, Value', 'Initials, Value', 'BusinessTelephoneNumber, Value', 'SendRichInfo, Value', 'ObjectType, Value', 'DisplayType, Value', 'RejectMessagesFromDLMembers, Indicator', 'AcceptMessagesOnlyFromDLMembers, Indicator', 'RejectMessagesFrom, Indicator', 'AcceptMessagesOnlyFrom, Indicator', 'UmSpokenName, Indicator', 'ThumbnailPhoto, Indicator') DiffRetentionPeriod = "30" IsDefault = $false # Updated Property Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOOnPremisesOrganization/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOOnPremisesOrganization/1-Create.ps1 index 437b7ee3f1..98ed5fd428 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOOnPremisesOrganization/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOOnPremisesOrganization/1-Create.ps1 @@ -18,15 +18,34 @@ Configuration Example { EXOOnPremisesOrganization 'ConfigureOnPremisesOrganization' { - Identity = 'Contoso' + Identity = 'Integration' Comment = 'Mail for Contoso' - HybridDomains = 'contoso.com', 'sales.contoso.com' - InboundConnector = 'Inbound to Contoso' - OrganizationGuid = 'a1bc23cb-3456-bcde-abcd-feb363cacc88' - OrganizationName = 'Contoso' - OutboundConnector = 'Outbound to Contoso' + HybridDomains = 'o365dsc.onmicrosoft.com' + InboundConnector = 'Integration Inbound Connector' + OrganizationGuid = 'e7a80bcf-696e-40ca-8775-a7f85fbb3ebc' + OrganizationName = 'O365DSC' + OutboundConnector = 'Contoso Outbound Connector' Ensure = 'Present' Credential = $Credscredential + DependsOn = "[EXOOutboundConnector]OutboundDependency" + } + EXOOutboundConnector 'OutboundDependency' + { + Identity = "Contoso Outbound Connector" + AllAcceptedDomains = $False + CloudServicesMailEnabled = $False + Comment = "Outbound connector to Contoso" + ConnectorSource = "Default" + ConnectorType = "Partner" + Enabled = $True + IsTransportRuleScoped = $False + RecipientDomains = "contoso.com" + RouteAllMessagesViaOnPremises = $False + TlsDomain = "*.contoso.com" + TlsSettings = "DomainValidation" + UseMxRecord = $True + Ensure = "Present" + Credential = $Credscredential } } } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/1-Create.ps1 deleted file mode 100644 index d1d7bf88d2..0000000000 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/1-Create.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -<# -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. -#> - -Configuration Example -{ - param - ( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXOOutboundConnector 'ConfigureOutboundConnector' - { - Identity = "Contoso Outbound Connector" - AllAcceptedDomains = $True - CloudServicesMailEnabled = $True - Comment = "Outbound connector to Contoso" - ConnectorSource = "Default" - ConnectorType = "OnPremises" - Enabled = $True - IsTransportRuleScoped = $True - RecipientDomains = "*.contoso.com" - RouteAllMessagesViaOnPremises = $True - TlsDomain = "*.contoso.com" - TlsSettings = "DomainValidation" - UseMxRecord = $True - Ensure = "Present" - Credential = $Credscredential - } - } -} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/2-Update.ps1 index 9f20787d0a..503f87c410 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOOutboundConnector/2-Update.ps1 @@ -18,15 +18,15 @@ Configuration Example EXOOutboundConnector 'ConfigureOutboundConnector' { Identity = "Contoso Outbound Connector" - AllAcceptedDomains = $True - CloudServicesMailEnabled = $True + AllAcceptedDomains = $False + CloudServicesMailEnabled = $False Comment = "Outbound connector to Contoso" ConnectorSource = "Default" - ConnectorType = "OnPremises" - Enabled = $False # Updated Property - IsTransportRuleScoped = $True - RecipientDomains = "*.contoso.com" - RouteAllMessagesViaOnPremises = $True + ConnectorType = "Partner" + Enabled = $False # Updated Property + IsTransportRuleScoped = $False + RecipientDomains = "contoso.com" + RouteAllMessagesViaOnPremises = $False TlsDomain = "*.contoso.com" TlsSettings = "DomainValidation" UseMxRecord = $True diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/1-Create.ps1 index 044d825ba0..a70e94d02c 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/1-Create.ps1 @@ -19,7 +19,6 @@ Configuration Example { Name = "HRApp" ApplicationIdentifier = "00000006-0000-0dd1-ac00-000000000000" - AccountType = "OrganizationalAccount" Enabled = $True Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/2-Update.ps1 index 29be55ca27..a38a41068b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOPartnerApplication/2-Update.ps1 @@ -19,7 +19,6 @@ Configuration Example { Name = "HRApp" ApplicationIdentifier = "00000006-0000-0dd1-ac00-000000000000" - AccountType = "OrganizationalAccount" Enabled = $False # Updated Property Ensure = "Present" Credential = $Credscredential diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/1-Create.ps1 index a520894b77..48d306104b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/1-Create.ps1 @@ -20,12 +20,12 @@ Configuration Example EXOPlace 'TestPlace' { AudioDeviceName = "MyAudioDevice"; - Capacity = 15; #Drift + Capacity = 15; City = ""; Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Present' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; IsWheelChairAccessible = $True; MTREnabled = $False; ParentType = "None"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/2-Update.ps1 index 0652a062c7..b84d5cc320 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/2-Update.ps1 @@ -25,7 +25,7 @@ Configuration Example Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Present' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; IsWheelChairAccessible = $True; MTREnabled = $False; ParentType = "None"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/3-Remove.ps1 index 9be622e644..51ad933226 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOPlace/3-Remove.ps1 @@ -23,7 +23,7 @@ Configuration Example Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Absent' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; } } } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/1-Create.ps1 index 2bc4e0aee5..885d097448 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/1-Create.ps1 @@ -25,11 +25,11 @@ Configuration Example ContentType = "MimeHtmlText" DeliveryReportEnabled = $True DisplaySenderName = $True - DomainName = "*" + DomainName = "contoso.com" IsInternal = $False LineWrapSize = "Unlimited" MeetingForwardNotificationEnabled = $False - Name = "Default" + Name = "Integration" NonMimeCharacterSet = "iso-8859-1" PreferredInternetCodePageForShiftJis = "Undefined" TargetDeliveryDomain = $False diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/2-Update.ps1 index beeaa531a9..22d9d7249d 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXORemoteDomain/2-Update.ps1 @@ -25,9 +25,9 @@ Configuration Example ContentType = "MimeHtmlText" DeliveryReportEnabled = $True DisplaySenderName = $True - DomainName = "*" + DomainName = "contoso.com" IsInternal = $False - LineWrapSize = "Unlimited" + LineWrapSize = "Integration" MeetingForwardNotificationEnabled = $False Name = "Default" NonMimeCharacterSet = "iso-8859-1" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/1-Create.ps1 index b10f42c4aa..255584dbd0 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/1-Create.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeAttachmentRule 'ConfigureSafeAttachmentRule' @@ -20,9 +21,9 @@ Configuration Example Identity = "Research Department Attachment Rule" Comments = "Applies to Research Department, except managers" Enabled = $True - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeAttachmentPolicy = "Marketing Block Attachments" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/2-Update.ps1 index 7b064d7d99..6aa8a4a02b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeAttachmentRule/2-Update.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeAttachmentRule 'ConfigureSafeAttachmentRule' @@ -20,9 +21,9 @@ Configuration Example Identity = "Research Department Attachment Rule" Comments = "Applies to Research Department, except managers" Enabled = $False # Updated Property - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeAttachmentPolicy = "Marketing Block Attachments" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/1-Create.ps1 index c0f0456700..1d27ca318e 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/1-Create.ps1 @@ -24,7 +24,6 @@ Configuration Example EnableOrganizationBranding = $True EnableSafeLinksForTeams = $True ScanUrls = $True - UseTranslatedNotificationText = $True Ensure = 'Present' Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/2-Update.ps1 index 09de5e45b7..ae083d94a0 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksPolicy/2-Update.ps1 @@ -24,7 +24,6 @@ Configuration Example EnableOrganizationBranding = $False # Updated Property EnableSafeLinksForTeams = $True ScanUrls = $True - UseTranslatedNotificationText = $True Ensure = 'Present' Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/1-Create.ps1 index c94452d712..f89887d86b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/1-Create.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeLinksRule 'ConfigureSafeLinksRule' @@ -20,9 +21,9 @@ Configuration Example Identity = "Research Department URL Rule" Comments = "Applies to Research Department, except managers" Enabled = $True - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeLinksPolicy = "Marketing Block URL" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/2-Update.ps1 index 6a672a2158..c86aa8e09a 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSafeLinksRule/2-Update.ps1 @@ -13,6 +13,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeLinksRule 'ConfigureSafeLinksRule' @@ -20,9 +21,9 @@ Configuration Example Identity = "Research Department URL Rule" Comments = "Applies to Research Department, except managers" Enabled = $False # Updated Property - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeLinksPolicy = "Marketing Block URL" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/1-Create.ps1 index b672e18961..83fac8d5ff 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/1-Create.ps1 @@ -17,9 +17,10 @@ Configuration Example { EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain") + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain") + Alias = "IntegrationSM" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/2-Update.ps1 index a009e6f9bc..addaba121b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/2-Update.ps1 @@ -17,9 +17,10 @@ Configuration Example { EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain", "AlexW@$Domain") # Updated Property + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain", "IntegrationSM2@$Domain") + Alias = "IntegrationSM" Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/3-Remove.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/3-Remove.ps1 index 3b1b6ce72b..90388f70c4 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/3-Remove.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOSharedMailbox/3-Remove.ps1 @@ -17,9 +17,10 @@ Configuration Example { EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain", "AlexW@$Domain") # Updated Property + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain", "IntegrationSM2@$Domain") + Alias = "IntegrationSM" Ensure = "Absent" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/1-Create.ps1 index 4d6573cdd3..3fb7c0a9fe 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/1-Create.ps1 @@ -13,14 +13,15 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOTransportRule 'ConfigureTransportRule' { - Name = "Ethical Wall - Sales and Brokerage Departments" - BetweenMemberOf1 = "Sales Department" - BetweenMemberOf2 = "Brokerage Department" - ExceptIfFrom = "Tony Smith","Pilar Ackerman" + Name = "Ethical Wall - Sales and Executives Departments" + BetweenMemberOf1 = "SalesTeam@$Domain" + BetweenMemberOf2 = "Executives@$Domain" + ExceptIfFrom = "AdeleV@$Domain" ExceptIfSubjectContainsWords = "Press Release","Corporate Communication" RejectMessageReasonText = "Messages sent between the Sales and Brokerage departments are strictly prohibited." Enabled = $True diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/2-Update.ps1 index 39e2e3a262..ebec921bdd 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOTransportRule/2-Update.ps1 @@ -13,17 +13,18 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOTransportRule 'ConfigureTransportRule' { - Name = "Ethical Wall - Sales and Brokerage Departments" - BetweenMemberOf1 = "Sales Department" - BetweenMemberOf2 = "Brokerage Department" - ExceptIfFrom = "Tony Smith","Pilar Ackerman" + Name = "Ethical Wall - Sales and Executives Departments" + BetweenMemberOf1 = "SalesTeam@$Domain" + BetweenMemberOf2 = "Executives@$Domain" + ExceptIfFrom = "AdeleV@$Domain" ExceptIfSubjectContainsWords = "Press Release","Corporate Communication" - RejectMessageReasonText = "Updated" # Updated Property - Enabled = $True + RejectMessageReasonText = "Messages sent between the Sales and Brokerage departments are strictly prohibited." + Enabled = $False # Updated Property Ensure = "Present" Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 index 4b432876d5..4ded070db3 100644 --- a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 +++ b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 2024-01-25 +# Generated on: 2024-02-01 @{ @@ -11,7 +11,7 @@ # RootModule = '' # Version number of this module. - ModuleVersion = '1.24.124.1' + ModuleVersion = '1.24.131.1' # Supported PSEditions # CompatiblePSEditions = @() @@ -66,19 +66,19 @@ # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @( - 'modules\M365DSCAgent.psm1', - 'modules\M365DSCDocGenerator.psm1', - 'modules\M365DSCErrorHandler.psm1', - 'modules\M365DSCLogEngine.psm1', - 'modules\M365DSCPermissions.psm1', - 'modules\M365DSCReport.psm1', - 'modules\M365DSCReverse.psm1', - 'modules\M365DSCStubsUtility.psm1', - 'modules\M365DSCTelemetryEngine.psm1', - 'modules\M365DSCUtil.psm1', - 'modules\M365DSCDRGUtil.psm1', - 'modules\EncodingHelpers\M365DSCEmojis.psm1', - 'modules\EncodingHelpers\M365DSCStringEncoding.psm1' + 'Modules/M365DSCAgent.psm1', + 'Modules/M365DSCDocGenerator.psm1', + 'Modules/M365DSCErrorHandler.psm1', + 'Modules/M365DSCLogEngine.psm1', + 'Modules/M365DSCPermissions.psm1', + 'Modules/M365DSCReport.psm1', + 'Modules/M365DSCReverse.psm1', + 'Modules/M365DSCStubsUtility.psm1', + 'Modules/M365DSCTelemetryEngine.psm1', + 'Modules/M365DSCUtil.psm1', + 'Modules/M365DSCDRGUtil.psm1', + 'Modules/EncodingHelpers/M365DSCEmojis.psm1', + 'Modules/EncodingHelpers/M365DSCStringEncoding.psm1' ) # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. @@ -140,90 +140,34 @@ IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true' # ReleaseNotes of this module - ReleaseNotes = '* AADAuthenticationMethodPolicyAuthenticator - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicyEmail - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicyFido2 - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicySms - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicySoftware - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicyTemporary - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicyVoice - * Remove the logic path to create a new instance in favor of the update flow. - * AADAuthenticationMethodPolicyX509 - * Remove the logic path to create a new instance in favor of the update flow. - * AADConditionalAccessPolicy - * Fix issue when not all parameters are specified - FIXES [[#4202](https://github.com/microsoft/Microsoft365DSC/issues/4202)] - * AADCrossTenantAccessPolicy - * Removed the ability to specify a value of Absent for the Ensure property. - * AADCrossTenantAccessPolicyCOnfigurationDefault - * Removed the ability to specify a value of Absent for the Ensure property. - * AADGroup - * Changed Set logic to restore groups from the deleted list if a match by - DisplayName is found. - * EXOActiveSyncDeviceAccessRule - * Changed the way Identity is determined by using a combination of the - QueryString and Characteristic parameters. - * EXOAddressList - * Fixed an issue trying to create a new instance when DisplayName is empty. - * EXOApplicationAccessPolicy - * Changed the logic to retrieve existing instances based on Scope. - * EXODataClassification - * DEPRECATED Resource. - * SCAutoSensitivityLabelRule - * Correct export indentation, which caused an issue with report conversion to JSON. - FIXES [[#4240](https://github.com/microsoft/Microsoft365DSC/issues/4240)] - * SPOSharingSettings - * Fixed an Issue where the MySiteSharingCapability could be returned as an - empty string instead of a null value from the Get method. - * TeamsAppPermissionPolicy, TeamsAppSetupPolicy, TeamsCallHoldPolicy, - TeamsIPPhonePolicy, TeamsMobilityPolicy, TeamsNetworkRoamingPolicy, - TeamsShiftsPolicy, TeamsTenantNetworkRegion, TeamsTenantNetworkSite, - TeamsTenantNetworkSubnet, TeamsTenantTrustedIPAddress, TeamsTranslationRule, - TeamsUnassignedNumberTreatment, TeamsVdiPolicy, TeamsWorkloadPolicy - * Fix condition when resource is absent - FIXES [#4227](https://github.com/microsoft/Microsoft365DSC/issues/4227) - * TeamsAudioConferencingPolicy - * Fix condition in Test-TargetResource when resource is absent - FIXES [#4215](https://github.com/microsoft/Microsoft365DSC/issues/4215) - * TeamsCallParkPolicy - * Fix condition in Test-TargetResource when resource is absent - FIXES [#4210](https://github.com/microsoft/Microsoft365DSC/issues/4210) - * TeamsComplianceRecordingPolicy - * Fix condition in Test-TargetResource when resource is absent - FIXES [#4212](https://github.com/microsoft/Microsoft365DSC/issues/4212) - * TeamsCortanaPolicy - * Fix condition in Test-TargetResource when resource is absent - FIXES [#4208](https://github.com/microsoft/Microsoft365DSC/issues/4208) - * TeamsEnhancedEncryptionPolicy - * Fix condition when resource is absent - FIXES [#4221](https://github.com/microsoft/Microsoft365DSC/issues/4221) - * TeamsEventsPolicy - * Add missing attributes - FIXES [#4242](https://github.com/microsoft/Microsoft365DSC/issues/4242) - * TeamsFeedbackPolicy - * Fix condition when resource is absent - FIXES [#4223](https://github.com/microsoft/Microsoft365DSC/issues/4223) - * TeamsFilesPolicy - * Fix condition when resource is absent - FIXES [#4225](https://github.com/microsoft/Microsoft365DSC/issues/4225) - * TeamsGroupPolicyAssignment - * Ensure assignment can still be created if GroupId is not found by trying to - search by DisplayName afterwards - FIXES [#4248](https://github.com/microsoft/Microsoft365DSC/issues/4248) - * TeamsMeetingBroadcastPolicy + ReleaseNotes = '* EXOAvailabilityAddressSpace + * Added support for the TargetServiceEpr and TargetTenantId parameters. + * Fixed the logic to retrieve existing instance by Forest Name. + * EXODistributionGroup + * The Get function now retrieves the ModeratedBy and ManagedBy properties + by the users UPN instead of their GUID. + * EXOHostedContentFilterRule + * Changed logic to retrieve the Rules by name. Using the Policys name instead. + * EXOIntraOrganizationConnector + * Fixes the DiscoveryEndpoint value from the Get method to include trailing + forward slash. + * EXOMalwareFilterRule + * Fixed an issue retrieving the right value for the Enabled property + * EXOOMEConfiguration + * Fixes an error in the Get method where the ExternalMailExpiryInDays property + wasnt properly returned. + * EXOSafeLinksPolicy + * Deprecated the UseTranslatedNotificationText property + * TeamsEmergencyCallRoutingPolicy * Fix deletion of resource - FIXES [#4231](https://github.com/microsoft/Microsoft365DSC/issues/4231) - * TeamsMobilityPolicy - * Validate string set on parameter MobileDialerPreference + FIXES [#4261](https://github.com/microsoft/Microsoft365DSC/issues/4261) + * TEAMS + * Added support for ManagedIdentity Authentication across Teams resources. * DEPENDENCIES - * Updated Microsoft.Graph dependencies to version 2.12.0. - * Updated MicrosoftTeams dependencies to version 5.9.0.' + * Updated MSCloudLoginAssistant dependencies to version 1.1.10. + * MISC + * Change the way to Export encoding is done so that it no longer relies + on the Get-DSCResource function.' # Flag to indicate whether the module requires explicit user acceptance for install/update # RequireLicenseAcceptance = $false diff --git a/Modules/Microsoft365DSC/Modules/EncodingHelpers/M365DSCStringEncoding.psm1 b/Modules/Microsoft365DSC/Modules/EncodingHelpers/M365DSCStringEncoding.psm1 index e668fbb411..3d1ddc9224 100644 --- a/Modules/Microsoft365DSC/Modules/EncodingHelpers/M365DSCStringEncoding.psm1 +++ b/Modules/Microsoft365DSC/Modules/EncodingHelpers/M365DSCStringEncoding.psm1 @@ -42,9 +42,12 @@ function Format-M365DSCString # Cache the DSC resource to a script-scope variable. # This avoids fetching the definition multiple times for the same resource, increasing overall speed. - if (-not ($DSCResource.Name -eq $ResourceName)) { - $Script:DSCResource = Get-DscResource -Module 'Microsoft365DSC' -Name $ResourceName - } + $ResourcePath = Join-Path -Path $PSScriptRoot ` + -ChildPath "../../DSCResources/MSFT_$ResourceName/MSFT_$ResourceName.psm1" ` + -Resolve + + Import-Module $ResourcePath + $commandInfo = Get-Command -Module "MSFT_$ResourceName" | Where-Object -FilterScript {$_.Name -eq 'Get-TargetResource'} # For each invalid character, look for an instance in the string, # if an instance is found, @@ -56,14 +59,13 @@ function Format-M365DSCString $newProperties.$key.GetType().ToString() -eq 'System.String') { # Obtain the type for this property from the module; - $foundProperty = $DSCResource.Properties | Where-Object -FilterScript { $_.Name -eq $key } foreach ($entry in $InvalidCharacters) { - if ($foundProperty.PropertyType -eq '[string]') + if ($commandInfo.$key.ParameterType -eq 'String') { $newProperties.$key = $newProperties.$key.Replace($entry.InvalidCharacter.ToString(), $entry.MainReplaceBy.ToString()) } - elseif ($foundProperty.PropertyType -like '`[MSFT_*`]') + elseif ($foundProperty.PropertyType -like "CIMInstance*") { # Case property is a CIMInstance $newProperties.$key = $newProperties.$key.Replace($entry.InvalidCharacter.ToString(), $entry.CimReplaceBy.ToString()) diff --git a/Modules/Microsoft365DSC/Modules/M365DSCErrorHandler.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCErrorHandler.psm1 index dbc985f6f5..de7422a510 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCErrorHandler.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCErrorHandler.psm1 @@ -19,8 +19,11 @@ function Save-M365DSCPartialExport $FileName ) - $tempPath = Join-Path -Path $env:TEMP -ChildPath $FileName - $Content | Out-File -FilePath $tempPath -Append:$true -Force + if (-not [System.String]::IsNullOrEmpty($env:Temp)) + { + $tempPath = Join-Path -Path $env:TEMP -ChildPath $FileName + $Content | Out-File -FilePath $tempPath -Append:$true -Force + } } Export-ModuleMember -Function @( diff --git a/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 index f9e589b770..3f5af826af 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 @@ -95,6 +95,7 @@ function Start-M365DSCConfigurationExtract # PowerShell Gallery try { + Write-Verbose -Message 'Testing Module Validity' Test-M365DSCModuleValidity } catch @@ -111,6 +112,7 @@ function Start-M365DSCConfigurationExtract if ($null -ne $Workloads) { + Write-Verbose -Message 'Retrieving the resources to export by workloads' $Components = Get-M365DSCResourcesByWorkloads -Workloads $Workloads ` -Mode $Mode } @@ -189,6 +191,7 @@ function Start-M365DSCConfigurationExtract # received, write a warning. if ($Components.Length -eq 0) { + Write-Verbose -Message 'Retrieving all resources' $allResourcesInModule = Get-M365DSCAllResources $selectedItems = Compare-Object -ReferenceObject $allResourcesInModule ` -DifferenceObject $ComponentsToSkip | Where-Object -FilterScript { $_.SideIndicator -eq '<=' } @@ -203,6 +206,7 @@ function Start-M365DSCConfigurationExtract $selectedResources = $Components } + Write-Verbose -Message 'Based on provided parameters, retrieving the most secure authentication method to use.' $allSupportedResourcesWithMostSecureAuthMethod = Get-M365DSCComponentsWithMostSecureAuthenticationType -AuthenticationMethod $AuthMethods ` -Resources $selectedResources @@ -272,6 +276,7 @@ function Start-M365DSCConfigurationExtract { if ($null -ne $Credential -and $Credential.UserName.Contains('@')) { + Write-Verbose -Message "Retrieving organization name based on provided credentials." $organization = $Credential.UserName.Split('@')[1] } } @@ -443,6 +448,7 @@ function Start-M365DSCConfigurationExtract $newline = $true # Add the Credential to the Credentials List + Write-Verbose -Message 'Adding the provided credentials to the list of variables' Save-Credentials -UserName 'credential' } 'ManagedIdentity' @@ -470,14 +476,17 @@ function Start-M365DSCConfigurationExtract $DSCContent.Append(" Node localhost`r`n") | Out-Null $DSCContent.Append(" {`r`n") | Out-Null + Write-Verbose -Message 'Adding initial entry in the ConfigurationData file.' Add-ConfigurationDataEntry -Node 'localhost' ` -Key 'ServerNumber' ` -Value '0' ` -Description 'Default Value Used to Ensure a Configuration Data File is Generated' + Write-Verbose -Message 'Retrieving resources path' $ResourcesPath = Join-Path -Path $PSScriptRoot ` - -ChildPath '..\DSCResources\' ` + -ChildPath '../DSCResources/' ` -Resolve + Write-Verbose -Message 'Loop through all resources files.' $AllResources = Get-ChildItem $ResourcesPath -Recurse | Where-Object { $_.Name -like 'MSFT_*.psm1' } $i = 1 @@ -550,6 +559,7 @@ function Start-M365DSCConfigurationExtract } } + $ResourcesPath = $ResourcesPath | Sort-Object $_.Name foreach ($resource in $ResourcesPath) { $resourceName = $resource.Name.Split('.')[0] -replace 'MSFT_', '' @@ -801,9 +811,12 @@ function Start-M365DSCConfigurationExtract { foreach ($fileToCopy in $filesToDownload) { - $filePath = Join-Path $env:Temp $fileToCopy.Name -Resolve - $destPath = Join-Path $OutputDSCPath $fileToCopy.Name - Copy-Item -Path $filePath -Destination $destPath + if (-not [System.String]::IsNullOrEmpty($env:Temp)) + { + $filePath = Join-Path $env:Temp $fileToCopy.Name -Resolve + $destPath = Join-Path $OutputDSCPath $fileToCopy.Name + Copy-Item -Path $filePath -Destination $destPath + } } } } @@ -824,44 +837,51 @@ function Start-M365DSCConfigurationExtract if (!$AzureAutomation -and !$ManagedIdentity.IsPresent) { - if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) + try { - $LCMConfig = Get-DscLocalConfigurationManager - if ($null -ne $LCMConfig.CertificateID) + if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { - try + $LCMConfig = Get-DscLocalConfigurationManager + if ($null -ne $LCMConfig.CertificateID) { - # Export the certificate assigned to the LCM - $certPath = $OutputDSCPath + 'M365DSC.cer' - if (Test-Path $certPath) + try { - Remove-Item $certPath -Force + # Export the certificate assigned to the LCM + $certPath = $OutputDSCPath + 'M365DSC.cer' + if (Test-Path $certPath) + { + Remove-Item $certPath -Force + } + Export-Certificate -FilePath $certPath ` + -Cert "cert:\LocalMachine\my\$($LCMConfig.CertificateID)" ` + -Type CERT ` + -NoClobber | Out-Null + } + catch + { + New-M365DSCLogEntry -Message 'Error while exporting the DSC certificate:' ` + -Exception $_ ` + -Source $($MyInvocation.MyCommand.Source) ` + -TenantId $TenantId ` + -Credential $Credential } - Export-Certificate -FilePath $certPath ` - -Cert "cert:\LocalMachine\my\$($LCMConfig.CertificateID)" ` - -Type CERT ` - -NoClobber | Out-Null - } - catch - { - New-M365DSCLogEntry -Message 'Error while exporting the DSC certificate:' ` - -Exception $_ ` - -Source $($MyInvocation.MyCommand.Source) ` - -TenantId $TenantId ` - -Credential $Credential - } - Add-ConfigurationDataEntry -Node 'localhost' ` - -Key 'CertificateFile' ` - -Value 'M365DSC.cer' ` - -Description 'Path of the certificate used to encrypt credentials in the file.' + Add-ConfigurationDataEntry -Node 'localhost' ` + -Key 'CertificateFile' ` + -Value 'M365DSC.cer' ` + -Description 'Path of the certificate used to encrypt credentials in the file.' + } + } + else + { + Write-Host "$($Global:M365DSCEmojiYellowCircle) Warning {" -NoNewline + Write-Host "Cannot export Local Configuration Manager settings. This process isn't executed with Administrative Privileges!" -NoNewline -ForegroundColor DarkCyan + Write-Host '}' } } - else + catch { - Write-Host "$($Global:M365DSCEmojiYellowCircle) Warning {" -NoNewline - Write-Host "Cannot export Local Configuration Manager settings. This process isn't executed with Administrative Privileges!" -NoNewline -ForegroundColor DarkCyan - Write-Host '}' + Write-Verbose -Message "Could not retrieve current Windows Principal. This may be due to the fact that the current OS is not Windows." } } $outputConfigurationData = $OutputDSCPath + 'ConfigurationData.psd1' @@ -880,8 +900,11 @@ function Start-M365DSCConfigurationExtract } catch { - $partialPath = Join-Path $env:TEMP -ChildPath "$($Global:PartialExportFileName)" - Write-Host "Partial Export file was saved at: $partialPath" + if (-not [System.String]::IsNullOrEmpty($env:Temp)) + { + $partialPath = Join-Path $env:TEMP -ChildPath "$($Global:PartialExportFileName)" + Write-Host "Partial Export file was saved at: $partialPath" + } throw $_ } } diff --git a/Modules/Microsoft365DSC/Modules/M365DSCTelemetryEngine.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCTelemetryEngine.psm1 index 168b0fc893..f9d9554dd2 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCTelemetryEngine.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCTelemetryEngine.psm1 @@ -12,7 +12,7 @@ function Get-ApplicationInsightsTelemetryClient if ($null -eq $Global:M365DSCTelemetryEngine) { - $AI = "$PSScriptRoot\..\Dependencies\Microsoft.ApplicationInsights.dll" + $AI = "$PSScriptRoot/../Dependencies/Microsoft.ApplicationInsights.dll" [Reflection.Assembly]::LoadFile($AI) | Out-Null $InstrumentationKey = [System.Environment]::GetEnvironmentVariable('M365DSCTelemetryInstrumentationKey', ` @@ -192,7 +192,7 @@ function Add-M365DSCTelemetryEvent # Get Dependencies loaded versions try { - $currentPath = Join-Path -Path $PSScriptRoot -ChildPath '..\' -Resolve + $currentPath = Join-Path -Path $PSScriptRoot -ChildPath '../' -Resolve $manifest = Import-PowerShellDataFile "$currentPath/Microsoft365DSC.psd1" $dependencies = $manifest.RequiredModules diff --git a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 index 9f10e145ac..aca92258d4 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 @@ -2748,7 +2748,7 @@ function Update-M365DSCDependencies $Global:MaximumFunctionCount = 32767 $InformationPreference = 'Continue' - $currentPath = Join-Path -Path $PSScriptRoot -ChildPath '..\' -Resolve + $currentPath = Join-Path -Path $PSScriptRoot -ChildPath '../' -Resolve $manifest = Import-PowerShellDataFile "$currentPath/Dependencies/Manifest.psd1" $dependencies = $manifest.Dependencies $i = 1 @@ -2767,11 +2767,20 @@ function Update-M365DSCDependencies if ((-not $found -or $Force) -and -not $ValidateOnly) { - if ((-not(([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) -and ($Scope -eq "AllUsers")) + $errorFound = $false + try + { + if ((-not(([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) -and ($Scope -eq "AllUsers")) + { + Write-Error 'Cannot update the dependencies for Microsoft365DSC. You need to run this command as a local administrator.' + $errorFound = $true + } + } + catch { - Write-Error 'Cannot update the dependencies for Microsoft365DSC. You need to run this command as a local administrator.' + Write-Verbose -Message "Couldn't retrieve Windows Principal. One possible cause is that the current environment is not Windows OS." } - else + if (-not $errorFound) { Write-Information -MessageData "Installing $($dependency.ModuleName) version {$($dependency.RequiredVersion)}" Remove-Module $dependency.ModuleName -Force -ErrorAction SilentlyContinue diff --git a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Remove.Tests.ps1 b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Remove.Tests.ps1 index 6415d0c12a..15a3838ebc 100644 --- a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Remove.Tests.ps1 +++ b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Remove.Tests.ps1 @@ -199,14 +199,6 @@ } }; } - AADSecurityDefaults 'Defaults' - { - Credential = $Credscredential; - Description = "Security defaults is a set of basic identity security mechanisms recommended by Microsoft. When enabled, these recommendations will be automatically enforced in your organization. Administrators and users will be better protected from common identity related attacks."; - DisplayName = "Security Defaults"; - IsEnabled = $True; - IsSingleInstance = "Yes"; - } AADServicePrincipal 'AADServicePrincipal' { AppId = "AppDisplayName" diff --git a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Update.Tests.ps1 b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Update.Tests.ps1 index a7e5141668..21be834009 100644 --- a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Update.Tests.ps1 +++ b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.AAD.Update.Tests.ps1 @@ -695,6 +695,14 @@ Credential = $Credscredential Ensure = 'Present' } + AADSecurityDefaults 'Defaults' + { + Credential = $Credscredential; + Description = "Security defaults is a set of basic identity security mechanisms recommended by Microsoft. When enabled, these recommendations will be automatically enforced in your organization. Administrators and users will be better protected from common identity related attacks."; + DisplayName = "Security Defaults"; + IsEnabled = $False; + IsSingleInstance = "Yes"; + } AADServicePrincipal 'AADServicePrincipal' { AppId = 'AppDisplayName' diff --git a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Create.Tests.ps1 b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Create.Tests.ps1 index 56c0957ebf..8ae6b2b387 100644 --- a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Create.Tests.ps1 +++ b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Create.Tests.ps1 @@ -83,13 +83,7 @@ EXOAntiPhishRule 'ConfigureAntiPhishRule' { Identity = "Test Rule" - ExceptIfSentToMemberOf = $null - ExceptIfSentTo = $null - SentTo = $null - ExceptIfRecipientDomainIs = $null - Comments = $null AntiPhishPolicy = "Our Rule" - RecipientDomainIs = $null Enabled = $True SentToMemberOf = @("executives@$Domain") Ensure = "Present" @@ -125,7 +119,7 @@ } EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' { - UserName = "AdeleV" + UserName = "AdeleV@$Domain" AuthenticationPolicyName = "Block Basic Auth" Ensure = "Present" Credential = $Credscredential @@ -133,9 +127,10 @@ EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFB' + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'o365dsc.onmicrosoft.com' Ensure = 'Present' Credential = $Credscredential } @@ -163,15 +158,6 @@ Ensure = "Present" Credential = $Credscredential } - EXODataEncryptionPolicy 'ConfigureDataEncryptionPolicy' - { - Identity = 'US Mailboxes' - Name = 'All US Mailboxes' - Description = 'All Mailboxes of users in the US' - Enabled = $true - Ensure = "Present" - Credential = $Credscredential - } EXODistributionGroup 'DemoDG' { Alias = "demodg"; @@ -187,7 +173,6 @@ ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; @@ -196,7 +181,7 @@ EXODkimSigningConfig 'ConfigureDKIMSigning' { KeySize = 1024 - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain HeaderCanonicalization = "Relaxed" Enabled = $True BodyCanonicalization = "Relaxed" @@ -220,20 +205,10 @@ ConditionalCompany = "Contoso" ConditionalDepartment = "Human Resources" ConditionalStateOrProvince = "Washington" + IncludedRecipients = 'AllRecipients' Ensure = "Present" Credential = $Credscredential } - EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' - { - Identity = "Integration Policy" - AdminDisplayName = "" - EnableSafeList = $False - IPAllowList = @() - IPBlockList = @() - MakeDefault = $False - Ensure = "Present" - Credential = $Credscredential - } EXOHostedContentFilterPolicy 'ConfigureHostedContentFilterPolicy' { Identity = "Integration CFP" @@ -242,12 +217,8 @@ BulkSpamAction = "MoveToJmf" BulkThreshold = 7 DownloadLink = $False - EnableEndUserSpamNotifications = $False EnableLanguageBlockList = $False EnableRegionBlockList = $False - EndUserSpamNotificationCustomSubject = "" - EndUserSpamNotificationFrequency = 3 - EndUserSpamNotificationLanguage = "Default" HighConfidencePhishAction = "Quarantine" HighConfidenceSpamAction = "MoveToJmf" IncreaseScoreWithBizOrInfoUrls = "Off" @@ -256,7 +227,7 @@ IncreaseScoreWithRedirectToOtherPort = "Off" InlineSafetyTipsEnabled = $True LanguageBlockList = @() - MakeDefault = $True + MakeDefault = $False MarkAsSpamBulkMail = "On" MarkAsSpamEmbedTagsInHtml = "Off" MarkAsSpamEmptyMessages = "Off" @@ -284,10 +255,11 @@ } EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" Comments = "Applies to all users, except when member of HR group" Enabled = $True - ExceptIfSentToMemberOf = "Contoso Human Resources" + ExceptIfSentToMemberOf = "LegalTeam@$Domain" + RecipientDomainIs = @('contoso.com') HostedContentFilterPolicy = "Integration CFP" Ensure = "Present" Credential = $Credscredential @@ -313,30 +285,30 @@ Identity = "Contoso Executives" Comments = "Does not apply to Executives" Enabled = $True - ExceptIfFrom = "John Smith" + ExceptIfFrom = "AdeleV@$Domain" + FromMemberOf = "Executives@$Domain" HostedOutboundSpamFilterPolicy = "Integration SFP" Ensure = "Present" Credential = $Credscredential } EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" - CloudServicesMailEnabled = $True - Comment = "Inbound connector for Contoso" + Identity = "Integration Inbound Connector" + CloudServicesMailEnabled = $False + Comment = "Inbound connector for Integration" ConnectorSource = "Default" - ConnectorType = "OnPremises" + ConnectorType = "Partner" Enabled = $True RequireTls = $True SenderDomains = "*.contoso.com" TlsSenderCertificateName = "contoso.com" - TreatMessagesAsInternal = $True Ensure = "Present" Credential = $Credscredential } EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $True Ensure = "Present" @@ -364,7 +336,7 @@ ModeratedBy = @() ModerationEnabled = $false Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $true CustomAttribute1 = 'Custom Value 1' @@ -409,7 +381,7 @@ { Name = "MyDisplayName" Description = "" - Parent = "contoso.onmicrosoft.com\MyProfileInformation" + Parent = "$Domain\MyProfileInformation" Ensure = "Present" Credential = $Credscredential } @@ -419,7 +391,7 @@ Ensure = "Present"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AdeleV"; + User = "AdeleV@$Domain"; } EXOMessageClassification 'ConfigureMessageClassification' { @@ -497,7 +469,6 @@ { Name = "Integration Address Book" AddressLists = @('\Offline Global Address List') - ConfiguredAttributes = @('OfficeLocation, ANR', 'ProxyAddresses, ANR', 'PhoneticGivenName, ANR', 'GivenName, ANR', 'PhoneticSurname, ANR', 'Surname, ANR', 'Account, ANR', 'PhoneticDisplayName, ANR', 'UserInformationDisplayName, ANR', 'ExternalMemberCount, Value', 'TotalMemberCount, Value', 'ModerationEnabled, Value', 'DelivContLength, Value', 'MailTipTranslations, Value', 'ObjectGuid, Value', 'IsOrganizational, Value', 'HabSeniorityIndex, Value', 'DisplayTypeEx, Value', 'SimpleDisplayNameAnsi, Value', 'HomeMdbA, Value', 'Certificate, Value', 'UserSMimeCertificate, Value', 'UserCertificate, Value', 'Comment, Value', 'PagerTelephoneNumber, Value', 'AssistantTelephoneNumber, Value', 'MobileTelephoneNumber, Value', 'PrimaryFaxNumber, Value', 'Home2TelephoneNumberMv, Value', 'Business2TelephoneNumberMv, Value', 'HomeTelephoneNumber, Value', 'TargetAddress, Value', 'PhoneticDepartmentName, Value', 'DepartmentName, Value', 'Assistant, Value', 'PhoneticCompanyName, Value', 'CompanyName, Value', 'Title, Value', 'Country, Value', 'PostalCode, Value', 'StateOrProvince, Value', 'Locality, Value', 'StreetAddress, Value', 'Initials, Value', 'BusinessTelephoneNumber, Value', 'SendRichInfo, Value', 'ObjectType, Value', 'DisplayType, Value', 'RejectMessagesFromDLMembers, Indicator', 'AcceptMessagesOnlyFromDLMembers, Indicator', 'RejectMessagesFrom, Indicator', 'AcceptMessagesOnlyFrom, Indicator', 'UmSpokenName, Indicator', 'ThumbnailPhoto, Indicator') DiffRetentionPeriod = "30" IsDefault = $true Ensure = "Present" @@ -519,15 +490,34 @@ } EXOOnPremisesOrganization 'ConfigureOnPremisesOrganization' { - Identity = 'Contoso' + Identity = 'Integration' Comment = 'Mail for Contoso' - HybridDomains = 'contoso.com', 'sales.contoso.com' - InboundConnector = 'Inbound to Contoso' - OrganizationGuid = 'a1bc23cb-3456-bcde-abcd-feb363cacc88' - OrganizationName = 'Contoso' - OutboundConnector = 'Outbound to Contoso' + HybridDomains = 'o365dsc.onmicrosoft.com' + InboundConnector = 'Integration Inbound Connector' + OrganizationGuid = 'e7a80bcf-696e-40ca-8775-a7f85fbb3ebc' + OrganizationName = 'O365DSC' + OutboundConnector = 'Contoso Outbound Connector' Ensure = 'Present' Credential = $Credscredential + DependsOn = "[EXOOutboundConnector]OutboundDependency" + } + EXOOutboundConnector 'OutboundDependency' + { + Identity = "Contoso Outbound Connector" + AllAcceptedDomains = $False + CloudServicesMailEnabled = $False + Comment = "Outbound connector to Contoso" + ConnectorSource = "Default" + ConnectorType = "Partner" + Enabled = $True + IsTransportRuleScoped = $False + RecipientDomains = "contoso.com" + RouteAllMessagesViaOnPremises = $False + TlsDomain = "*.contoso.com" + TlsSettings = "DomainValidation" + UseMxRecord = $True + Ensure = "Present" + Credential = $Credscredential } EXOOrganizationRelationship 'ConfigureOrganizationRelationship' { @@ -547,24 +537,6 @@ Ensure = "Present" Credential = $Credscredential } - EXOOutboundConnector 'ConfigureOutboundConnector' - { - Identity = "Contoso Outbound Connector" - AllAcceptedDomains = $True - CloudServicesMailEnabled = $True - Comment = "Outbound connector to Contoso" - ConnectorSource = "Default" - ConnectorType = "OnPremises" - Enabled = $True - IsTransportRuleScoped = $True - RecipientDomains = "*.contoso.com" - RouteAllMessagesViaOnPremises = $True - TlsDomain = "*.contoso.com" - TlsSettings = "DomainValidation" - UseMxRecord = $True - Ensure = "Present" - Credential = $Credscredential - } EXOOwaMailboxPolicy 'ConfigureOwaMailboxPolicy' { Name = "OwaMailboxPolicy-Integration" @@ -647,7 +619,6 @@ { Name = "HRApp" ApplicationIdentifier = "00000006-0000-0dd1-ac00-000000000000" - AccountType = "OrganizationalAccount" Enabled = $True Ensure = "Present" Credential = $Credscredential @@ -655,12 +626,12 @@ EXOPlace 'TestPlace' { AudioDeviceName = "MyAudioDevice"; - Capacity = 15; #Drift + Capacity = 15; City = ""; Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Present' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; IsWheelChairAccessible = $True; MTREnabled = $False; ParentType = "None"; @@ -694,11 +665,11 @@ ContentType = "MimeHtmlText" DeliveryReportEnabled = $True DisplaySenderName = $True - DomainName = "*" + DomainName = "contoso.com" IsInternal = $False LineWrapSize = "Unlimited" MeetingForwardNotificationEnabled = $False - Name = "Default" + Name = "Integration" NonMimeCharacterSet = "iso-8859-1" PreferredInternetCodePageForShiftJis = "Undefined" TargetDeliveryDomain = $False @@ -740,9 +711,9 @@ Identity = "Research Department Attachment Rule" Comments = "Applies to Research Department, except managers" Enabled = $True - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeAttachmentPolicy = "Marketing Block Attachments" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } @@ -755,7 +726,6 @@ EnableOrganizationBranding = $True EnableSafeLinksForTeams = $True ScanUrls = $True - UseTranslatedNotificationText = $True Ensure = 'Present' Credential = $Credscredential } @@ -764,17 +734,18 @@ Identity = "Research Department URL Rule" Comments = "Applies to Research Department, except managers" Enabled = $True - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeLinksPolicy = "Marketing Block URL" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain") + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain") + Alias = "IntegrationSM" Ensure = "Present" Credential = $Credscredential } @@ -789,10 +760,10 @@ } EXOTransportRule 'ConfigureTransportRule' { - Name = "Ethical Wall - Sales and Brokerage Departments" - BetweenMemberOf1 = "Sales Department" - BetweenMemberOf2 = "Brokerage Department" - ExceptIfFrom = "Tony Smith","Pilar Ackerman" + Name = "Ethical Wall - Sales and Executives Departments" + BetweenMemberOf1 = "SalesTeam@$Domain" + BetweenMemberOf2 = "Executives@$Domain" + ExceptIfFrom = "AdeleV@$Domain" ExceptIfSubjectContainsWords = "Press Release","Corporate Communication" RejectMessageReasonText = "Messages sent between the Sales and Brokerage departments are strictly prohibited." Enabled = $True diff --git a/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Update.Tests.ps1 b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Update.Tests.ps1 new file mode 100644 index 0000000000..25081b9bf3 --- /dev/null +++ b/Tests/Integration/Microsoft365DSC/M365DSCIntegration.EXO.Update.Tests.ps1 @@ -0,0 +1,1137 @@ + param + ( + [Parameter()] + [System.Management.Automation.PSCredential] + $Credential + ) + + Configuration Master + { + param + ( + [Parameter(Mandatory = $true)] + [System.Management.Automation.PSCredential] + $Credscredential + ) + + Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] + Node Localhost + { + EXOAcceptedDomain 'O365DSCDomain' + { + Identity = $Domain + DomainType = "Authoritative" + OutboundOnly = $true # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOActiveSyncDeviceAccessRule 'ConfigureActiveSyncDeviceAccessRule' + { + Identity = "ContosoPhone(DeviceOS)" + Characteristic = "DeviceModel" # Updated Property + QueryString = "iOS 6.1 10B145" + AccessLevel = "Allow" + Ensure = "Present" + Credential = $Credscredential + } + EXOAddressBookPolicy 'ConfigureAddressBookPolicy' + { + Name = "All Fabrikam ABP" + AddressLists = "\All Users" + RoomList = "\All Rooms" + OfflineAddressBook = "\Default Offline Address Book" + GlobalAddressList = "\Default Global Address List" + Ensure = "Present" + Credential = $Credscredential + } + EXOAddressList 'HRUsersAddressList' + { + Name = "HR Users" + ConditionalCompany = "Contoso" + ConditionalDepartment = "HR2" # Updated Property + ConditionalStateOrProvince = "US" + IncludedRecipients = "AllRecipients" + Ensure = "Present" + Credential = $Credscredential + } + EXOAntiPhishPolicy 'ConfigureAntiphishPolicy' + { + Identity = "Our Rule" + MakeDefault = $null + PhishThresholdLevel = 2 # Updated Property + EnableTargetedDomainsProtection = $null + Enabled = $null + TargetedDomainsToProtect = $null + EnableSimilarUsersSafetyTips = $null + ExcludedDomains = $null + TargetedDomainActionRecipients = $null + EnableMailboxIntelligence = $null + EnableSimilarDomainsSafetyTips = $null + AdminDisplayName = "" + AuthenticationFailAction = "MoveToJmf" + TargetedUserProtectionAction = "NoAction" + TargetedUsersToProtect = $null + EnableTargetedUserProtection = $null + ExcludedSenders = $null + EnableOrganizationDomainsProtection = $null + EnableUnusualCharactersSafetyTips = $null + TargetedUserActionRecipients = $null + Ensure = "Present" + Credential = $Credscredential + } + EXOAntiPhishRule 'ConfigureAntiPhishRule' + { + Identity = "Test Rule" + Comments = "This is an updated comment." # Updated Property + AntiPhishPolicy = "Our Rule" + Enabled = $True + SentToMemberOf = @("executives@$Domain") + Ensure = "Present" + Credential = $Credscredential + } + EXOApplicationAccessPolicy 'ConfigureApplicationAccessPolicy' + { + Identity = "Integration Policy" + AccessRight = "DenyAccess" + AppID = '3dbc2ae1-7198-45ed-9f9f-d86ba3ec35b5' + PolicyScopeGroupId = "IntegrationMailEnabled@$Domain" + Description = "Engineering Group Policy Updated" # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOAtpPolicyForO365 'ConfigureAntiPhishPolicy' + { + IsSingleInstance = "Yes" + EnableATPForSPOTeamsODB = $true + Ensure = "Present" + Credential = $Credscredential + } + EXOAuthenticationPolicy 'ConfigureAuthenticationPolicy' + { + Identity = "Block Basic Auth" + AllowBasicAuthActiveSync = $False + AllowBasicAuthAutodiscover = $False + AllowBasicAuthImap = $False + AllowBasicAuthMapi = $True # Updated Property + AllowBasicAuthOfflineAddressBook = $False + AllowBasicAuthOutlookService = $False + AllowBasicAuthPop = $False + AllowBasicAuthPowerShell = $False + AllowBasicAuthReportingWebServices = $False + AllowBasicAuthRpc = $False + AllowBasicAuthSmtp = $False + AllowBasicAuthWebServices = $False + Ensure = "Present" + Credential = $Credscredential + } + EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' + { + UserName = "AdeleV@$Domain" + AuthenticationPolicyName = "Test Policy" # Updaqted Property + Ensure = "Present" + Credential = $Credscredential + } + EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' + { + Identity = 'Contoso.com' + AccessMethod = 'OrgWideFBToken' + ForestName = 'example.contoso.com' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'contoso.onmicrosoft.com' # Updated Property + Ensure = 'Present' + Credential = $Credscredential + } + EXOAvailabilityConfig 'ConfigureAvailabilityConfig' + { + OrgWideAccount = "alexW@$Domain" # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOCalendarProcessing 'CalendarProcessing' + { + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $False; # Updated Property + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + Credential = $credsCredential; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + Ensure = "Present"; + ForwardRequestsToDelegates = $True; + Identity = "AdeleV"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @("AlexW@$Domain"); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + EXOCASMailboxPlan 'ConfigureCASMailboxPlan' + { + ActiveSyncEnabled = $True + OwaMailboxPolicy = "OwaMailboxPolicy-Default" + PopEnabled = $False # Updated Property + Identity = 'ExchangeOnlineEnterprise' + ImapEnabled = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOCASMailboxSettings 'AdeleVCasMailboxSettings' + { + ActiveSyncAllowedDeviceIDs = @() + ActiveSyncBlockedDeviceIDs = @() + ActiveSyncDebugLogging = $False + ActiveSyncEnabled = $True + ActiveSyncMailboxPolicy = 'Demo EXO Mobile Device Policy Default' + ActiveSyncSuppressReadReceipt = $False + EwsEnabled = $True + Identity = 'AdeleV' + ImapEnabled = $True # Updated Property + ImapForceICalForCalendarRetrievalOption = $False + ImapMessagesRetrievalMimeFormat = 'BestBodyFormat' + ImapSuppressReadReceipt = $False + ImapUseProtocolDefaults = $True + MacOutlookEnabled = $True + MAPIEnabled = $True + OutlookMobileEnabled = $True + OWAEnabled = $True + OWAforDevicesEnabled = $True + OwaMailboxPolicy = 'OwaMailboxPolicy-Default' + PopEnabled = $False + PopForceICalForCalendarRetrievalOption = $True + PopMessagesRetrievalMimeFormat = 'BestBodyFormat' + PopSuppressReadReceipt = $False + PopUseProtocolDefaults = $True + PublicFolderClientAccess = $False + ShowGalAsDefaultView = $True + UniversalOutlookEnabled = $True + Ensure = 'Present' + Credential = $Credscredential + } + EXOClientAccessRule 'ConfigureClientAccessRule' + { + Action = "AllowAccess" + UserRecipientFilter = $null + ExceptAnyOfAuthenticationTypes = @() + ExceptUsernameMatchesAnyOfPatterns = @() + AnyOfAuthenticationTypes = @() + UsernameMatchesAnyOfPatterns = @() + Identity = "Always Allow Remote PowerShell" + Priority = 1 + AnyOfProtocols = @("RemotePowerShell") + Enabled = $False # Updated Property + ExceptAnyOfProtocols = @() + ExceptAnyOfClientIPAddressesOrRanges = @() + AnyOfClientIPAddressesOrRanges = @() + Ensure = "Present" + Credential = $Credscredential + } + EXODataClassification 'ConfigureDataClassification' + { + Description = "Detects formatted and unformatted Canadian social insurance number."; + Ensure = "Present"; + Identity = "a2f29c85-ecb8-4514-a610-364790c0773e"; + IsDefault = $True; + Locale = "en-US"; + Name = "Canada Social Insurance Number"; + Credential = $Credscredential + } + EXODistributionGroup 'DemoDG' + { + Alias = "demodg"; + BccBlocked = $True; # Updated Property + BypassNestedModerationEnabled = $False; + DisplayName = "My Demo DG"; + Ensure = "Present"; + HiddenGroupMembershipEnabled = $True; + ManagedBy = @("adeleV@$Domain"); + MemberDepartRestriction = "Open"; + MemberJoinRestriction = "Closed"; + ModeratedBy = @("alexW@$Domain"); + ModerationEnabled = $False; + Identity = "DemoDG"; + Name = "DemoDG"; + PrimarySmtpAddress = "demodg@$Domain"; + RequireSenderAuthenticationEnabled = $True; + SendModerationNotifications = "Always"; + Credential = $Credscredential + } + EXODkimSigningConfig 'ConfigureDKIMSigning' + { + KeySize = 1024 + Identity = $Domain + HeaderCanonicalization = "Relaxed" + Enabled = $False # Updated Property + BodyCanonicalization = "Relaxed" + AdminDisplayName = "" + Ensure = "Present" + Credential = $Credscredential + } + EXOEmailAddressPolicy 'ConfigureEmailAddressPolicy' + { + Name = "Integration Policy" + EnabledEmailAddressTemplates = @("SMTP:@$Domain") + EnabledPrimarySMTPAddressTemplate = "@$Domain" + ManagedByFilter = "" + Priority = 2 # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOGlobalAddressList 'ConfigureGlobalAddressList' + { + Name = "Contoso Human Resources in Washington" + ConditionalCompany = "Contoso" + ConditionalDepartment = "Finances" # Updated Property + ConditionalStateOrProvince = "Washington" + Ensure = "Present" + Credential = $Credscredential + } + EXOGroupSettings 'TestGroup' + { + DisplayName = "Test Group"; + AccessType = "Public"; + AlwaysSubscribeMembersToCalendarEvents = $False; + AuditLogAgeLimit = "90.00:00:00"; + AutoSubscribeNewMembers = $False; + CalendarMemberReadOnly = $False; + ConnectorsEnabled = $False; # Updated Property + Credential = $Credscredential; + HiddenFromAddressListsEnabled = $True; + HiddenFromExchangeClientsEnabled = $True; + InformationBarrierMode = "Open"; + Language = "en-US"; + MaxReceiveSize = "36 MB (37,748,736 bytes)"; + MaxSendSize = "35 MB (36,700,160 bytes)"; + ModerationEnabled = $False; + Notes = "My Notes"; + PrimarySmtpAddress = "TestGroup@$Domain"; + RequireSenderAuthenticationEnabled = $True; + SubscriptionEnabled = $False; + } + EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' + { + Identity = "Default" + AdminDisplayName = "" + EnableSafeList = $True # Updated Property + IPAllowList = @() + IPBlockList = @() + MakeDefault = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOHostedContentFilterPolicy 'ConfigureHostedContentFilterPolicy' + { + Identity = "Integration CFP" + AddXHeaderValue = "" + AdminDisplayName = "" + BulkSpamAction = "MoveToJmf" + BulkThreshold = 7 + DownloadLink = $True # Updated Property + EnableLanguageBlockList = $False + EnableRegionBlockList = $False + HighConfidencePhishAction = "Quarantine" + HighConfidenceSpamAction = "MoveToJmf" + IncreaseScoreWithBizOrInfoUrls = "Off" + IncreaseScoreWithImageLinks = "Off" + IncreaseScoreWithNumericIps = "Off" + IncreaseScoreWithRedirectToOtherPort = "Off" + InlineSafetyTipsEnabled = $True + LanguageBlockList = @() + MakeDefault = $False + MarkAsSpamBulkMail = "On" + MarkAsSpamEmbedTagsInHtml = "Off" + MarkAsSpamEmptyMessages = "Off" + MarkAsSpamFormTagsInHtml = "Off" + MarkAsSpamFramesInHtml = "Off" + MarkAsSpamFromAddressAuthFail = "Off" + MarkAsSpamJavaScriptInHtml = "Off" + MarkAsSpamNdrBackscatter = "Off" + MarkAsSpamObjectTagsInHtml = "Off" + MarkAsSpamSensitiveWordList = "Off" + MarkAsSpamSpfRecordHardFail = "Off" + MarkAsSpamWebBugsInHtml = "Off" + ModifySubjectValue = "" + PhishSpamAction = "MoveToJmf" + PhishZapEnabled = $True + QuarantineRetentionPeriod = 15 + RedirectToRecipients = @() + RegionBlockList = @() + SpamAction = "MoveToJmf" + SpamZapEnabled = $True + TestModeAction = "None" + TestModeBccToRecipients = @() + Ensure = "Present" + Credential = $Credscredential + } + EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' + { + Identity = "Integration CFR" + Comments = "Applies to all users, except when member of HR group" + Enabled = $False # Updated Property + ExceptIfSentToMemberOf = "LegalTeam@$Domain" + RecipientDomainIs = @('contoso.com') + HostedContentFilterPolicy = "Integration CFP" + Ensure = "Present" + Credential = $Credscredential + } + EXOHostedOutboundSpamFilterPolicy 'HostedOutboundSpamFilterPolicy' + { + Identity = "Integration SFP" + ActionWhenThresholdReached = "BlockUserForToday" + AdminDisplayName = "" + AutoForwardingMode = "Automatic" + BccSuspiciousOutboundAdditionalRecipients = @() + BccSuspiciousOutboundMail = $False + NotifyOutboundSpam = $False + NotifyOutboundSpamRecipients = @() + RecipientLimitExternalPerHour = 0 + RecipientLimitInternalPerHour = 1 # Updated Property + RecipientLimitPerDay = 0 + Ensure = "Present" + Credential = $Credscredential + } + EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' + { + Identity = "Contoso Executives" + Comments = "Does not apply to Executives" + Enabled = $False # Updated Property + ExceptIfFrom = "AdeleV@$Domain" + FromMemberOf = "Executives@$Domain" + HostedOutboundSpamFilterPolicy = "Integration SFP" + Ensure = "Present" + Credential = $Credscredential + } + EXOInboundConnector 'ConfigureInboundConnector' + { + Identity = "Integration Inbound Connector" + CloudServicesMailEnabled = $False + Comment = "Inbound connector for Integration" + ConnectorSource = "Default" + ConnectorType = "Partner" + Enabled = $False # Updated Property + RequireTls = $True + SenderDomains = "*.contoso.com" + TlsSenderCertificateName = "contoso.com" + Ensure = "Present" + Credential = $Credscredential + } + EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' + { + Identity = "MainCloudConnector" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" + TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" + Enabled = $False # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOIRMConfiguration 'ConfigureIRMConfiguration' + { + IsSingleInstance = 'Yes' + AutomaticServiceUpdateEnabled = $True + AzureRMSLicensingEnabled = $True + DecryptAttachmentForEncryptOnly = $True + EDiscoverySuperUserEnabled = $True + EnablePdfEncryption = $True + InternalLicensingEnabled = $True + JournalReportDecryptionEnabled = $True + RejectIfRecipientHasNoRights = $True + SearchEnabled = $True + SimplifiedClientAccessDoNotForwardDisabled = $True + SimplifiedClientAccessEnabled = $True + SimplifiedClientAccessEncryptOnlyDisabled = $True + TransportDecryptionSetting = 'Mandatory' + Ensure = 'Present' + Credential = $Credscredential + } + EXOJournalRule 'CreateJournalRule' + { + Enabled = $False # Updated Property + JournalEmailAddress = "AdeleV@$Domain" + Name = "Send to Adele" + RuleScope = "Global" + Ensure = "Present" + Credential = $Credscredential + } + EXOMailboxAutoReplyConfiguration 'EXOMailboxAutoReplyConfiguration' + { + AutoDeclineFutureRequestsWhenOOF = $False; + AutoReplyState = "Disabled"; + CreateOOFEvent = $False; + Credential = $Credscredential; + DeclineAllEventsForScheduledOOF = $False; + DeclineEventsForScheduledOOF = $True; # Updated Property + DeclineMeetingMessage = ""; + EndTime = "1/23/2024 3:00:00 PM"; + Ensure = "Present"; + ExternalAudience = "All"; + ExternalMessage = ""; + Identity = "AdeleV@$Domain"; + InternalMessage = ""; + OOFEventSubject = ""; + StartTime = "1/22/2024 3:00:00 PM"; + } + EXOMailboxCalendarFolder 'JohnCalendarFolder' + { + Credential = $credsCredential; + DetailLevel = "AvailabilityOnly"; + Ensure = "Present"; + Identity = "AdeleV:\Calendar"; + PublishDateRangeFrom = "ThreeMonths"; + PublishDateRangeTo = "ThreeMonths"; + PublishEnabled = $True; # Updated Property + SearchableUrlEnabled = $False; + } + EXOMailboxPermission 'TestPermission' + { + AccessRights = @("FullAccess","ReadPermission"); + Credential = $credsCredential; + Deny = $True; # Updated Property + Ensure = "Present"; + Identity = "AdeleV"; + InheritanceType = "All"; + User = "NT AUTHORITY\SELF"; + } + EXOMailboxPlan 'ConfigureMailboxPlan' + { + Ensure = "Present"; + Identity = "Integration Plan"; + IssueWarningQuota = "98 GB (105,226,698,752 bytes)"; + MaxReceiveSize = "25 MB (26,214,400 bytes)"; + MaxSendSize = "25 MB (26,214,400 bytes)"; + ProhibitSendQuota = "99 GB (106,300,440,576 bytes)"; + ProhibitSendReceiveQuota = "15 GB (16,106,127,360 bytes)"; # Updated Property + RetainDeletedItemsFor = "14.00:00:00"; + RoleAssignmentPolicy = "Default Role Assignment Policy"; + Credential = $Credscredential + } + EXOMailboxSettings 'OttawaTeamMailboxSettings' + { + DisplayName = 'Ottawa Employees' + TimeZone = 'Eastern Standard Time' + Locale = 'en-US' # Updated Property + Ensure = 'Present' + Credential = $Credscredential + } + EXOMailContact 'TestMailContact' + { + Alias = 'TestMailContact' + Credential = $Credscredential + DisplayName = 'My Test Contact' + Ensure = 'Present' + ExternalEmailAddress = 'SMTP:test@tailspintoys.com' + MacAttachmentFormat = 'BinHex' + MessageBodyFormat = 'TextAndHtml' + MessageFormat = 'Mime' + ModeratedBy = @() + ModerationEnabled = $false + Name = 'My Test Contact' + OrganizationalUnit = $Domain + SendModerationNotifications = 'Always' + UsePreferMessageFormat = $false # Updated Property + CustomAttribute1 = 'Custom Value 1' + ExtensionCustomAttribute5 = 'Extension Custom Value 1', 'Extension Custom Value 2' + } + EXOMailTips 'OrgWideMailTips' + { + Organization = $Domain + MailTipsAllTipsEnabled = $True + MailTipsGroupMetricsEnabled = $False # Updated Property + MailTipsLargeAudienceThreshold = 100 + MailTipsMailboxSourcedTipsEnabled = $True + MailTipsExternalRecipientsTipsEnabled = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOMalwareFilterPolicy 'ConfigureMalwareFilterPolicy' + { + Identity = "IntegrationMFP" + CustomNotifications = $False + EnableExternalSenderAdminNotifications = $False + EnableFileFilter = $False + EnableInternalSenderAdminNotifications = $False + FileTypeAction = "Quarantine" + FileTypes = @("ace", "ani", "app", "cab", "docm", "exe", "iso", "jar", "jnlp", "reg", "scr", "vbe", "vbs") + QuarantineTag = "AdminOnlyAccessPolicy" + ZapEnabled = $False # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOMalwareFilterRule 'ConfigureMalwareFilterRule' + { + Identity = "Contoso Recipients" + MalwareFilterPolicy = "IntegrationMFP" + Comments = "Apply the filter to all Contoso users" + Enabled = $False # Updated Property + RecipientDomainIs = "contoso.com" + Ensure = "Present" + Credential = $Credscredential + } + EXOManagementRole 'ConfigureManagementRole' + { + Name = "MyDisplayName" + Description = "Updated Description" # Updated Property + Parent = "$Domain\MyProfileInformation" + Ensure = "Present" + Credential = $Credscredential + } + EXOManagementRoleAssignment 'AssignManagementRole' + { + Credential = $credsCredential; + Ensure = "Present"; + Name = "MyManagementRoleAssignment"; + Role = "UserApplication"; + User = "AlexW@$Domain"; # Updated Property + } + EXOMessageClassification 'ConfigureMessageClassification' + { + Identity = "Contoso Message Classification" + Name = "Contoso Message Classification" + DisplayName = "Contoso Message Classification" + DisplayPrecedence = "Highest" + PermissionMenuVisible = $True + RecipientDescription = "Shown to receipients" + SenderDescription = "Shown to senders" + RetainClassificationEnabled = $False # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOMobileDeviceMailboxPolicy 'ConfigureMobileDeviceMailboxPolicy' + { + Name = "Default" + AllowApplePushNotifications = $True + AllowBluetooth = "Allow" + AllowBrowser = $False # Updated Property + AllowCamera = $True + AllowConsumerEmail = $True + AllowDesktopSync = $True + AllowExternalDeviceManagement = $False + AllowGooglePushNotifications = $True + AllowHTMLEmail = $True + AllowInternetSharing = $True + AllowIrDA = $True + AllowMicrosoftPushNotifications = $True + AllowMobileOTAUpdate = $True + AllowNonProvisionableDevices = $True + AllowPOPIMAPEmail = $True + AllowRemoteDesktop = $True + AllowSimplePassword = $True + AllowSMIMEEncryptionAlgorithmNegotiation = "AllowAnyAlgorithmNegotiation" + AllowSMIMESoftCerts = $True + AllowStorageCard = $True + AllowTextMessaging = $True + AllowUnsignedApplications = $True + AllowUnsignedInstallationPackages = $True + AllowWiFi = $True + AlphanumericPasswordRequired = $False + ApprovedApplicationList = @() + AttachmentsEnabled = $True + DeviceEncryptionEnabled = $False + DevicePolicyRefreshInterval = "Unlimited" + IrmEnabled = $True + IsDefault = $True + MaxAttachmentSize = "Unlimited" + MaxCalendarAgeFilter = "All" + MaxEmailAgeFilter = "All" + MaxEmailBodyTruncationSize = "Unlimited" + MaxEmailHTMLBodyTruncationSize = "Unlimited" + MaxInactivityTimeLock = "Unlimited" + MaxPasswordFailedAttempts = "Unlimited" + MinPasswordComplexCharacters = 1 + PasswordEnabled = $False + PasswordExpiration = "Unlimited" + PasswordHistory = 0 + PasswordRecoveryEnabled = $False + RequireDeviceEncryption = $False + RequireEncryptedSMIMEMessages = $False + RequireEncryptionSMIMEAlgorithm = "TripleDES" + RequireManualSyncWhenRoaming = $False + RequireSignedSMIMEAlgorithm = "SHA1" + RequireSignedSMIMEMessages = $False + RequireStorageCardEncryption = $False + UnapprovedInROMApplicationList = @() + UNCAccessEnabled = $True + WSSAccessEnabled = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOOfflineAddressBook 'ConfigureOfflineAddressBook' + { + Name = "Integration Address Book" + AddressLists = @('\Offline Global Address List') + DiffRetentionPeriod = "30" + IsDefault = $false # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOOMEConfiguration 'ConfigureOMEConfiguration' + { + Identity = "Contoso Marketing" + BackgroundColor = "0x00FFFF00" + DisclaimerText = "Encryption security disclaimer." + EmailText = "Encrypted message enclosed." + ExternalMailExpiryInDays = 1 # Updated Property + IntroductionText = "You have received an encypted message" + OTPEnabled = $True + PortalText = "This portal is encrypted." + SocialIdSignIn = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOOnPremisesOrganization 'ConfigureOnPremisesOrganization' + { + Identity = 'Contoso' + Comment = 'Mail for Contoso. Updated' # Updated Property + HybridDomains = 'contoso.com', 'sales.contoso.com' + InboundConnector = 'Inbound to Contoso' + OrganizationGuid = 'a1bc23cb-3456-bcde-abcd-feb363cacc88' + OrganizationName = 'Contoso' + OutboundConnector = 'Outbound to Contoso' + Ensure = 'Present' + Credential = $Credscredential + } + EXOOrganizationConfig 'EXOOrganizationConfig' + { + IsSingleInstance = "Yes" + ElcProcessingDisabled = $False + DefaultPublicFolderProhibitPostQuota = "13 KB (13,312 bytes)" + VisibleMeetingUpdateProperties = "Location,AllProperties:15" + BookingsEnabled = $True + ExchangeNotificationRecipients = @() + EwsEnabled = $null + LinkPreviewEnabled = $True + FocusedInboxOn = $null + AsyncSendEnabled = $True + EwsAllowEntourage = $null + RemotePublicFolderMailboxes = @() + AuditDisabled = $False + EwsAllowMacOutlook = $null + ConnectorsEnabledForTeams = $True + DefaultPublicFolderIssueWarningQuota = "13 KB (13,312 bytes)" + MailTipsMailboxSourcedTipsEnabled = $True + EndUserDLUpgradeFlowsDisabled = $False + DistributionGroupDefaultOU = $null + OutlookPayEnabled = $True + EwsAllowOutlook = $null + DefaultAuthenticationPolicy = $null + DistributionGroupNameBlockedWordsList = @() + ConnectorsEnabled = $True + DefaultPublicFolderAgeLimit = $null + OutlookMobileGCCRestrictionsEnabled = $False + ActivityBasedAuthenticationTimeoutEnabled = $True + ConnectorsEnabledForYammer = $True + HierarchicalAddressBookRoot = $null + DefaultPublicFolderMaxItemSize = "13 KB (13,312 bytes)" + MailTipsLargeAudienceThreshold = 25 + ConnectorsActionableMessagesEnabled = $True + ExchangeNotificationEnabled = $True + ActivityBasedAuthenticationTimeoutWithSingleSignOnEnabled = $True + DirectReportsGroupAutoCreationEnabled = $False + OAuth2ClientProfileEnabled = $True + AppsForOfficeEnabled = $True + PublicFoldersEnabled = "Local" + WebPushNotificationsDisabled = $False + MailTipsGroupMetricsEnabled = $True + DefaultPublicFolderMovedItemRetention = "07.00:00:00" + DistributionGroupNamingPolicy = "" + DefaultPublicFolderDeletedItemRetention = "30.00:00:00" + MailTipsAllTipsEnabled = $True + LeanPopoutEnabled = $False + PublicComputersDetectionEnabled = $False + ByteEncoderTypeFor7BitCharsets = 0 + ConnectorsEnabledForOutlook = $True + WebSuggestedRepliesDisabled = $False + PublicFolderShowClientControl = $False + ActivityBasedAuthenticationTimeoutInterval = "06:00:00" + BookingsSocialSharingRestricted = $False + DefaultGroupAccessType = "Private" + IPListBlocked = @() + SmtpActionableMessagesEnabled = $True + SiteMailboxCreationURL = $null + BookingsPaymentsEnabled = $False + MailTipsExternalRecipientsTipsEnabled = $False + AutoExpandingArchive = $null + ConnectorsEnabledForSharepoint = $True + ReadTrackingEnabled = $False + Credential = $Credscredential + } + EXOOrganizationRelationship 'ConfigureOrganizationRelationship' + { + Name = "Contoso" + ArchiveAccessEnabled = $False # Updated Property + DeliveryReportEnabled = $True + DomainNames = "mail.contoso.com" + Enabled = $True + FreeBusyAccessEnabled = $True + FreeBusyAccessLevel = "AvailabilityOnly" + MailboxMoveEnabled = $True + MailTipsAccessEnabled = $True + MailTipsAccessLevel = "None" + PhotosEnabled = $True + TargetApplicationUri = "mail.contoso.com" + TargetAutodiscoverEpr = "https://mail.contoso.com/autodiscover/autodiscover.svc/wssecurity" + Ensure = "Present" + Credential = $Credscredential + } + EXOOutboundConnector 'ConfigureOutboundConnector' + { + Identity = "Contoso Outbound Connector" + AllAcceptedDomains = $False + CloudServicesMailEnabled = $False + Comment = "Outbound connector to Contoso" + ConnectorSource = "Default" + ConnectorType = "Partner" + Enabled = $False # Updated Property + IsTransportRuleScoped = $False + RecipientDomains = "contoso.com" + RouteAllMessagesViaOnPremises = $False + TlsDomain = "*.contoso.com" + TlsSettings = "DomainValidation" + UseMxRecord = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOOwaMailboxPolicy 'ConfigureOwaMailboxPolicy' + { + Name = "OwaMailboxPolicy-Integration" + ActionForUnknownFileAndMIMETypes = "ForceSave" + ActiveSyncIntegrationEnabled = $True + AdditionalStorageProvidersAvailable = $True + AllAddressListsEnabled = $True + AllowCopyContactsToDeviceAddressBook = $True + AllowedFileTypes = @(".rpmsg",".xlsx",".xlsm",".xlsb",".tiff",".pptx",".pptm",".ppsx",".ppsm",".docx",".docm",".zip",".xls",".wmv",".wma",".wav",".vsd",".txt",".tif",".rtf",".pub",".ppt",".png",".pdf",".one",".mp3",".jpg",".gif",".doc",".bmp",".avi") + AllowedMimeTypes = @("image/jpeg","image/png","image/gif","image/bmp") + BlockedFileTypes = @(".settingcontent-ms",".printerexport",".appcontent-ms",".appref-ms",".vsmacros",".website",".msh2xml",".msh1xml",".diagcab",".webpnp",".ps2xml",".ps1xml",".mshxml",".gadget",".theme",".psdm1",".mhtml",".cdxml",".xbap",".vhdx",".pyzw",".pssc",".psd1",".psc2",".psc1",".msh2",".msh1",".jnlp",".aspx",".appx",".xnk",".xml",".xll",".wsh",".wsf",".wsc",".wsb",".vsw",".vst",".vss",".vhd",".vbs",".vbp",".vbe",".url",".udl",".tmp",".shs",".shb",".sct",".scr",".scf",".reg",".pyz",".pyw",".pyo",".pyc",".pst",".ps2",".ps1",".prg",".prf",".plg",".pif",".pcd",".ops",".msu",".mst",".msp",".msi",".msh",".msc",".mht",".mdz",".mdw",".mdt",".mde",".mdb",".mda",".mcf",".maw",".mav",".mau",".mat",".mas",".mar",".maq",".mam",".mag",".maf",".mad",".lnk",".ksh",".jse",".jar",".its",".isp",".ins",".inf",".htc",".hta",".hpj",".hlp",".grp",".fxp",".exe",".der",".csh",".crt",".cpl",".com",".cnt",".cmd",".chm",".cer",".bat",".bas",".asx",".asp",".app",".apk",".adp",".ade",".ws",".vb",".py",".pl",".js") + BlockedMimeTypes = @("application/x-javascript","application/javascript","application/msaccess","x-internet-signup","text/javascript","application/xml","application/prg","application/hta","text/scriplet","text/xml") + ClassicAttachmentsEnabled = $True + ConditionalAccessPolicy = "Off" + DefaultTheme = "" + DirectFileAccessOnPrivateComputersEnabled = $True + DirectFileAccessOnPublicComputersEnabled = $False # Updated Property + DisplayPhotosEnabled = $True + ExplicitLogonEnabled = $True + ExternalImageProxyEnabled = $True + ForceSaveAttachmentFilteringEnabled = $False + ForceSaveFileTypes = @(".vsmacros",".ps2xml",".ps1xml",".mshxml",".gadget",".psc2",".psc1",".aspx",".wsh",".wsf",".wsc",".vsw",".vst",".vss",".vbs",".vbe",".url",".tmp",".swf",".spl",".shs",".shb",".sct",".scr",".scf",".reg",".pst",".ps2",".ps1",".prg",".prf",".plg",".pif",".pcd",".ops",".mst",".msp",".msi",".msh",".msc",".mdz",".mdw",".mdt",".mde",".mdb",".mda",".maw",".mav",".mau",".mat",".mas",".mar",".maq",".mam",".mag",".maf",".mad",".lnk",".ksh",".jse",".its",".isp",".ins",".inf",".hta",".hlp",".fxp",".exe",".dir",".dcr",".csh",".crt",".cpl",".com",".cmd",".chm",".cer",".bat",".bas",".asx",".asp",".app",".adp",".ade",".ws",".vb",".js") + ForceSaveMimeTypes = @("Application/x-shockwave-flash","Application/octet-stream","Application/futuresplash","Application/x-director") + ForceWacViewingFirstOnPrivateComputers = $False + ForceWacViewingFirstOnPublicComputers = $False + FreCardsEnabled = $True + GlobalAddressListEnabled = $True + GroupCreationEnabled = $True + InstantMessagingEnabled = $True + InstantMessagingType = "Ocs" + InterestingCalendarsEnabled = $True + IRMEnabled = $True + IsDefault = $True + JournalEnabled = $True + LocalEventsEnabled = $False + LogonAndErrorLanguage = 0 + NotesEnabled = $True + NpsSurveysEnabled = $True + OnSendAddinsEnabled = $False + OrganizationEnabled = $True + OutboundCharset = "AutoDetect" + OutlookBetaToggleEnabled = $True + OWALightEnabled = $True + PersonalAccountCalendarsEnabled = $True + PhoneticSupportEnabled = $False + PlacesEnabled = $True + PremiumClientEnabled = $True + PrintWithoutDownloadEnabled = $True + PublicFoldersEnabled = $True + RecoverDeletedItemsEnabled = $True + ReferenceAttachmentsEnabled = $True + RemindersAndNotificationsEnabled = $True + ReportJunkEmailEnabled = $True + RulesEnabled = $True + SatisfactionEnabled = $True + SaveAttachmentsToCloudEnabled = $True + SearchFoldersEnabled = $True + SetPhotoEnabled = $True + SetPhotoURL = "" + SignaturesEnabled = $True + SkipCreateUnifiedGroupCustomSharepointClassification = $True + TeamSnapCalendarsEnabled = $True + TextMessagingEnabled = $True + ThemeSelectionEnabled = $True + UMIntegrationEnabled = $True + UseGB18030 = $False + UseISO885915 = $False + UserVoiceEnabled = $True + WacEditingEnabled = $True + WacExternalServicesEnabled = $True + WacOMEXEnabled = $False + WacViewingOnPrivateComputersEnabled = $True + WacViewingOnPublicComputersEnabled = $True + WeatherEnabled = $True + WebPartsFrameOptionsType = "SameOrigin" + Ensure = "Present" + Credential = $Credscredential + } + EXOPartnerApplication 'ConfigurePartnerApplication' + { + Name = "HRApp" + ApplicationIdentifier = "00000006-0000-0dd1-ac00-000000000000" + Enabled = $False # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOPerimeterConfiguration 'ConfigurePerimeterConfiguration' + { + IsSingleInstance = 'Yes' + GatewayIPAddresses = '123.0.0.1' + Ensure = 'Present' + Credential = $Credscredential + } + EXOPlace 'TestPlace' + { + AudioDeviceName = "MyAudioDevice"; + Capacity = 16; # Updated Property + City = ""; + Credential = $Credscredential + DisplayDeviceName = "DisplayDeviceName"; + Ensure = 'Present' + Identity = "Hood@$Domain"; + IsWheelChairAccessible = $True; + MTREnabled = $False; + ParentType = "None"; + Phone = "555-555-5555"; + Tags = @("Tag1", "Tag2"); + VideoDeviceName = "VideoDevice"; + } + EXOPolicyTipConfig 'ConfigurePolicyTipConfig' + { + Name = "en\NotifyOnly" + Value = "This message contains content that is restricted by Contoso company policy. Updated" # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + EXOQuarantinePolicy 'ConfigureQuarantinePolicy' + { + EndUserQuarantinePermissionsValue = 87; + ESNEnabled = $True; # Updated Property + Identity = "$Domain\DefaultFullAccessPolicy"; + Ensure = "Present" + Credential = $Credscredential + } + EXORemoteDomain '583b0b70-b45d-401f-98a6-0e7fa8434946' + { + Identity = "Integration" + AllowedOOFType = "External" + AutoForwardEnabled = $True + AutoReplyEnabled = $False # Updated Property + ByteEncoderTypeFor7BitCharsets = "Undefined" + CharacterSet = "iso-8859-1" + ContentType = "MimeHtmlText" + DeliveryReportEnabled = $True + DisplaySenderName = $True + DomainName = "contoso.com" + IsInternal = $False + LineWrapSize = "Integration" + MeetingForwardNotificationEnabled = $False + Name = "Default" + NonMimeCharacterSet = "iso-8859-1" + PreferredInternetCodePageForShiftJis = "Undefined" + TargetDeliveryDomain = $False + TrustedMailInboundEnabled = $False + TrustedMailOutboundEnabled = $False + UseSimpleDisplayName = $False + Ensure = "Present" + Credential = $Credscredential + } + EXOReportSubmissionPolicy 'ConfigureReportSubmissionPolicy' + { + IsSingleInstance = 'Yes' + DisableQuarantineReportingOption = $False + EnableCustomNotificationSender = $False + EnableOrganizationBranding = $False + EnableReportToMicrosoft = $True + EnableThirdPartyAddress = $False + EnableUserEmailNotification = $False + PostSubmitMessageEnabled = $True + PreSubmitMessageEnabled = $True + ReportJunkToCustomizedAddress = $False + ReportNotJunkToCustomizedAddress = $False + ReportPhishToCustomizedAddress = $False + Ensure = "Present" + Credential = $Credscredential + } + EXOReportSubmissionRule 'ConfigureReportSubmissionRule' + { + IsSingleInstance = 'Yes' + Identity = "DefaultReportSubmissionRule" + Comments = "This is my default rule" + SentTo = "submission@contoso.com" + Ensure = "Present" + Credential = $Credscredential + } + EXOResourceConfiguration 'ConfigureResourceConfiguration' + { + IsSingleInstance = 'Yes' + ResourcePropertySchema = @('Room/TV', 'Equipment/Laptop') + Ensure = 'Present' + Credential = $Credscredential + } + EXORoleAssignmentPolicy 'ConfigureRoleAssignmentPolicy' + { + Name = "Integration Policy" + Description = "This policy grants end users the permission to set their options in Outlook on the web and perform other self-administration tasks." + IsDefault = $False # Updated Property + Roles = @("My Marketplace Apps","MyVoiceMail","MyDistributionGroups","MyRetentionPolicies","MyContactInformation","MyBaseOptions","MyTextMessaging","MyDistributionGroupMembership","MyProfileInformation","My Custom Apps","My ReadWriteMailbox Apps") + Ensure = "Present" + Credential = $Credscredential + } + EXORoleGroup 'ConfigureRoleGroup' + { + Name = "Contoso Role Group" + Description = "Address Lists Role for Exchange Administrators. Updated" # Updated Property + Members = @("Exchange Administrator") + Roles = @("Address Lists") + Ensure = "Present" + Credential = $Credscredential + } + EXOSafeAttachmentPolicy 'ConfigureSafeAttachmentPolicy' + { + Identity = "Marketing Block Attachments" + Enable = $False # Updated Property + Redirect = $True + RedirectAddress = "admin@$Domain" + Ensure = "Present" + Credential = $Credscredential + } + EXOSafeAttachmentRule 'ConfigureSafeAttachmentRule' + { + Identity = "Research Department Attachment Rule" + Comments = "Applies to Research Department, except managers" + Enabled = $False # Updated Property + ExceptIfSentToMemberOf = "Executives@$Domain" + SafeAttachmentPolicy = "Marketing Block Attachments" + SentToMemberOf = "LegalTeam@$Domain" + Ensure = "Present" + Credential = $Credscredential + } + EXOSafeLinksPolicy 'ConfigureSafeLinksPolicy' + { + Identity = 'Marketing Block URL' + AdminDisplayName = 'Marketing Block URL' + CustomNotificationText = 'Blocked URLs for Marketing' + DeliverMessageAfterScan = $True + EnableOrganizationBranding = $False # Updated Property + EnableSafeLinksForTeams = $True + ScanUrls = $True + Ensure = 'Present' + Credential = $Credscredential + } + EXOSafeLinksRule 'ConfigureSafeLinksRule' + { + Identity = "Research Department URL Rule" + Comments = "Applies to Research Department, except managers" + Enabled = $False # Updated Property + ExceptIfSentToMemberOf = "Executives@$Domain" + SafeLinksPolicy = "Marketing Block URL" + SentToMemberOf = "LegalTeam@$Domain" + Ensure = "Present" + Credential = $Credscredential + } + EXOSharedMailbox 'SharedMailbox' + { + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain", "IntegrationSM2@$Domain") + Alias = "IntegrationSM" + Ensure = "Present" + Credential = $Credscredential + } + EXOSharingPolicy 'ConfigureSharingPolicy' + { + Name = "Integration Sharing Policy" + Default = $False # Updated Property + Domains = @("Anonymous:CalendarSharingFreeBusyReviewer", "*:CalendarSharingFreeBusySimple") + Enabled = $True + Ensure = "Present" + Credential = $Credscredential + } + EXOTransportConfig 'EXOTransportConfig ' + { + IsSingleInstance = "Yes"; + AddressBookPolicyRoutingEnabled = $True; + ClearCategories = $True; + ConvertDisclaimerWrapperToEml = $False; + DSNConversionMode = "PreserveDSNBody"; + ExternalDelayDsnEnabled = $True; + ExternalDsnLanguageDetectionEnabled = $True; + ExternalDsnSendHtml = $True; + ExternalPostmasterAddress = "postmaster@contoso.com"; + HeaderPromotionModeSetting = "NoCreate"; + InternalDelayDsnEnabled = $True; + InternalDsnLanguageDetectionEnabled = $True; + InternalDsnSendHtml = $True; + JournalingReportNdrTo = "<>"; + JournalMessageExpirationDays = 0; + MaxRecipientEnvelopeLimit = "Unlimited"; + ReplyAllStormBlockDurationHours = 6; + ReplyAllStormDetectionMinimumRecipients = 2500; + ReplyAllStormDetectionMinimumReplies = 10; + ReplyAllStormProtectionEnabled = $True; + Rfc2231EncodingEnabled = $False; + SmtpClientAuthenticationDisabled = $True; + Credential = $Credscredential + } + EXOTransportRule 'ConfigureTransportRule' + { + Name = "Ethical Wall - Sales and Executives Departments" + BetweenMemberOf1 = "SalesTeam@$Domain" + BetweenMemberOf2 = "Executives@$Domain" + ExceptIfFrom = "AdeleV@$Domain" + ExceptIfSubjectContainsWords = "Press Release","Corporate Communication" + RejectMessageReasonText = "Messages sent between the Sales and Brokerage departments are strictly prohibited." + Enabled = $False # Updated Property + Ensure = "Present" + Credential = $Credscredential + } + } + } + + $ConfigurationData = @{ + AllNodes = @( + @{ + NodeName = "Localhost" + PSDSCAllowPlaintextPassword = $true + } + ) + } + + # Compile and deploy configuration + try + { + Master -ConfigurationData $ConfigurationData -Credscredential $Credential + Start-DscConfiguration Master -Wait -Force -Verbose -ErrorAction Stop + } + catch + { + throw $_ + } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAcceptedDomain.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAcceptedDomain.Tests.ps1 index 4cf3d643ae..f09e2bc4fb 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAcceptedDomain.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAcceptedDomain.Tests.ps1 @@ -51,12 +51,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Identity = 'contoso.com' } Mock -CommandName Get-AcceptedDomain -MockWith { - return @{ - DomainType = 'Authoritative' - Identity = 'different.contoso.com' - MatchSubDomains = $false - OutboundOnly = $false - } + return $null } Mock -CommandName Set-AcceptedDomain -MockWith { return @{ @@ -93,12 +88,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Get-AcceptedDomain -MockWith { - return @{ - DomainType = 'Authoritative' - Identity = 'different.tailspin.com' - MatchSubDomains = $false - OutboundOnly = $false - } + return $null } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityAddressSpace.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityAddressSpace.Tests.ps1 index 03e7bd73d9..082ebc201b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityAddressSpace.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityAddressSpace.Tests.ps1 @@ -57,16 +57,14 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Credential = $Credential Ensure = 'Present' Identity = 'contoso.com' - AccessMethod = 'OrgWideFB' - Credentials = $Null + AccessMethod = 'OrgWideFBToken' ForestName = 'contoso.com' - TargetAutodiscoverEpr = 'http://autodiscover.contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'http://autodiscover.contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'contoso.com' } Mock -CommandName Get-AvailabilityAddressSpace -MockWith { - return @{ - Identity = 'SomeOtherConnector' - } + return $null } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityConfig.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityConfig.Tests.ps1 index 21f2a299cb..15281ce041 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityConfig.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOAvailabilityConfig.Tests.ps1 @@ -52,9 +52,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Get-AvailabilityConfig -MockWith { - return @{ - OrgWideAccount = 'meganb' - } + return $null } Mock -CommandName Set-AvailabilityConfig -MockWith { @@ -86,12 +84,16 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-AvailabilityConfig -MockWith { + + Mock -CommandName Get-MgUser -MockWith { return @{ - OrgWideAccount = 'meganb' + UserPrincipalName = 'johndoe' } } + + Mock -CommandName Get-AvailabilityConfig -MockWith { + return $null + } } It 'Should return Absent from the Get method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXODistributionGroup.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXODistributionGroup.Tests.ps1 index 791f795732..d63570c9af 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXODistributionGroup.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXODistributionGroup.Tests.ps1 @@ -109,7 +109,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ManagedBy = @('john.smith@contoso.com') MemberDepartRestriction = 'Open' MemberJoinRestriction = 'Closed' - ModeratedBy = @('admin@contoso.com') + ModeratedBy = @('john.smith@contoso.com') ModerationEnabled = $False Identity = 'DemoDG' Name = 'DemoDG' @@ -119,6 +119,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SendModerationNotifications = 'Always' Credential = $Credential } + + + Mock -CommandName Get-MgUser -MockWith { + return @{ + UserPrincipalName = 'john.smith@contoso.com' + } + } Mock -CommandName Get-DistributionGroup -MockWith { return @{ @@ -130,7 +137,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ManagedBy = @('john.smith@contoso.com') MemberDepartRestriction = 'Open' MemberJoinRestriction = 'Open' # Drift - ModeratedBy = @('admin@contoso.com') + ModeratedBy = @('john.smith@contoso.com') ModerationEnabled = $False Identity = 'DemoDG' Name = 'DemoDG' @@ -169,7 +176,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ManagedBy = @('john.smith@contoso.com') MemberDepartRestriction = 'Open' MemberJoinRestriction = 'Closed' - ModeratedBy = @('admin@contoso.com') + ModeratedBy = @('john.smith@contoso.com') ModerationEnabled = $False Identity = 'DemoDG' Name = 'DemoDG' @@ -179,6 +186,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SendModerationNotifications = 'Always' Credential = $Credential } + + Mock -CommandName Get-MgUser -MockWith { + return @{ + UserPrincipalName = 'john.smith@contoso.com' + } + } Mock -CommandName Get-DistributionGroup -MockWith { return @{ @@ -190,7 +203,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ManagedBy = @('john.smith@contoso.com') MemberDepartRestriction = 'Open' MemberJoinRestriction = 'Closed' - ModeratedBy = @('admin@contoso.com') + ModeratedBy = @('john.smith@contoso.com') ModerationEnabled = $False Identity = 'DemoDG' Name = 'DemoDG' @@ -224,7 +237,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ManagedBy = @('john.smith@contoso.com') MemberDepartRestriction = 'Open' MemberJoinRestriction = 'Closed' - ModeratedBy = @('admin@contoso.com') + ModeratedBy = @('john.smith@contoso.com') ModerationEnabled = $False Identity = 'DemoDG' Name = 'DemoDG' @@ -234,6 +247,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SendModerationNotifications = 'Always' Credential = $Credential } + + Mock -CommandName Get-MgUser -MockWith { + return @{ + UserPrincipalName = 'john.smith@contoso.com' + } + } Mock -CommandName Get-DistributionGroup -MockWith { return @{ @@ -245,7 +264,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ManagedBy = @('john.smith@contoso.com') MemberDepartRestriction = 'Open' MemberJoinRestriction = 'Closed' - ModeratedBy = @('admin@contoso.com') + ModeratedBy = @('john.smith@contoso.com') ModerationEnabled = $False Identity = 'DemoDG' Name = 'DemoDG' @@ -279,6 +298,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } + + Mock -CommandName Get-MgUser -MockWith { + return @{ + UserPrincipalName = 'john.smith@contoso.com' + } + } Mock -CommandName Get-DistributionGroup -MockWith { return @{ diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOHostedContentFilterPolicy.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOHostedContentFilterPolicy.Tests.ps1 index 06966ab348..49e1d983d3 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOHostedContentFilterPolicy.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOHostedContentFilterPolicy.Tests.ps1 @@ -63,7 +63,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RedirectToRecipients = @() TestModeBccToRecipients = @() QuarantineRetentionPeriod = 15 - EndUserSpamNotificationFrequency = 1 TestModeAction = 'AddXHeader' IncreaseScoreWithImageLinks = 'Off' IncreaseScoreWithNumericIps = 'On' @@ -177,16 +176,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-HostedContentFilterPolicy -MockWith { return @{ - Ensure = 'Present' Identity = 'TestPolicy' - Credential = $Credential AdminDisplayName = 'This ContentFilter policiy is a test' AddXHeaderValue = 'MyCustomSpamHeader' ModifySubjectValue = 'SPAM!' RedirectToRecipients = @() TestModeBccToRecipients = @() QuarantineRetentionPeriod = 15 - EndUserSpamNotificationFrequency = 1 TestModeAction = 'AddXHeader' IncreaseScoreWithImageLinks = 'Off' IncreaseScoreWithNumericIps = 'On' @@ -209,12 +205,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { HighConfidencePhishAction = 'Quarantine' HighConfidenceSpamAction = 'Quarantine' SpamAction = 'MoveToJmf' - EnableEndUserSpamNotifications = $true DownloadLink = $false EnableRegionBlockList = $true EnableLanguageBlockList = $true - EndUserSpamNotificationCustomSubject = 'This is SPAM' - EndUserSpamNotificationLanguage = 'Default' BulkThreshold = 5 AllowedSenders = @{ Sender = @( diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOMalwareFilterRule.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOMalwareFilterRule.Tests.ps1 index 7e1dd5a1ce..ca6696b7ff 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOMalwareFilterRule.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOMalwareFilterRule.Tests.ps1 @@ -71,9 +71,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Get-MalwareFilterRule -MockWith { - return @{ - Identity = 'SomeOtherMalwareFilterRule' - } + return $null } } @@ -110,8 +108,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MalwareFilterRule -MockWith { return @{ - Ensure = 'Present' - Credential = $Credential Identity = 'TestMalwareFilterRule' Comments = 'This is a test rule' Enabled = $true @@ -121,6 +117,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { MalwareFilterPolicy = 'Policy1' Priority = '1' RecipientDomainIs = 'contoso.com' + State = 'Enabled' SentTo = @('will@contoso.com', 'bernadette@contoso.org') SentToMemberOf = @('Testgroup3', 'testgroup4') } @@ -152,11 +149,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MalwareFilterRule -MockWith { return @{ - Ensure = 'Present' - Credential = $Credential Identity = 'TestMalwareFilterRule' Comments = 'This is a test rule' Enabled = $true + State = 'Enabled' ExceptIfRecipientDomainIs = 'firma.de' ExceptIfSentTo = 'clausi@contoso.com' ExceptIfSentToMemberOf = 'Testgroup1' @@ -230,6 +226,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ExceptIfSentTo = 'clausi@contoso.com' ExceptIfSentToMemberOf = 'Testgroup1' MalwareFilterPolicy = 'Policy1' + State = 'Enabled' Priority = '2' RecipientDomainIs = 'contoso.com' SentTo = 'will@contoso.com' diff --git a/docs/docs/resources/azure-ad/AADSecurityDefaults.md b/docs/docs/resources/azure-ad/AADSecurityDefaults.md index e7fd866152..ad0419bced 100644 --- a/docs/docs/resources/azure-ad/AADSecurityDefaults.md +++ b/docs/docs/resources/azure-ad/AADSecurityDefaults.md @@ -70,7 +70,7 @@ Configuration Example Credential = $Credscredential; Description = "Security defaults is a set of basic identity security mechanisms recommended by Microsoft. When enabled, these recommendations will be automatically enforced in your organization. Administrators and users will be better protected from common identity related attacks."; DisplayName = "Security Defaults"; - IsEnabled = $True; + IsEnabled = $False; IsSingleInstance = "Yes"; } } diff --git a/docs/docs/resources/exchange/EXOAntiPhishRule.md b/docs/docs/resources/exchange/EXOAntiPhishRule.md index f58f4814ba..8b645130f9 100644 --- a/docs/docs/resources/exchange/EXOAntiPhishRule.md +++ b/docs/docs/resources/exchange/EXOAntiPhishRule.md @@ -66,13 +66,7 @@ Configuration Example EXOAntiPhishRule 'ConfigureAntiPhishRule' { Identity = "Test Rule" - ExceptIfSentToMemberOf = $null - ExceptIfSentTo = $null - SentTo = $null - ExceptIfRecipientDomainIs = $null - Comments = $null AntiPhishPolicy = "Our Rule" - RecipientDomainIs = $null Enabled = $True SentToMemberOf = @("executives@$Domain") Ensure = "Present" @@ -103,13 +97,8 @@ Configuration Example EXOAntiPhishRule 'ConfigureAntiPhishRule' { Identity = "Test Rule" - ExceptIfSentToMemberOf = $null - ExceptIfSentTo = $null - SentTo = $null - ExceptIfRecipientDomainIs = $null Comments = "This is an updated comment." # Updated Property AntiPhishPolicy = "Our Rule" - RecipientDomainIs = $null Enabled = $True SentToMemberOf = @("executives@$Domain") Ensure = "Present" diff --git a/docs/docs/resources/exchange/EXOAuthenticationPolicyAssignment.md b/docs/docs/resources/exchange/EXOAuthenticationPolicyAssignment.md index 96b4ec6b82..498c4d50bf 100644 --- a/docs/docs/resources/exchange/EXOAuthenticationPolicyAssignment.md +++ b/docs/docs/resources/exchange/EXOAuthenticationPolicyAssignment.md @@ -48,11 +48,12 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' { - UserName = "AdeleV" + UserName = "AdeleV@$Domain" AuthenticationPolicyName = "Block Basic Auth" Ensure = "Present" Credential = $Credscredential @@ -79,7 +80,7 @@ Configuration Example { EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' { - UserName = "AdeleV" + UserName = "AdeleV@$Domain" AuthenticationPolicyName = "Test Policy" # Updaqted Property Ensure = "Present" Credential = $Credscredential @@ -101,11 +102,12 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOAuthenticationPolicyAssignment 'ConfigureAuthenticationPolicyAssignment' { - UserName = "AdeleV" + UserName = "AdeleV@$Domain" AuthenticationPolicyName = "Test Policy" Ensure = "Absent" Credential = $Credscredential diff --git a/docs/docs/resources/exchange/EXOAvailabilityAddressSpace.md b/docs/docs/resources/exchange/EXOAvailabilityAddressSpace.md index f9230a9cd6..769b0472c4 100644 --- a/docs/docs/resources/exchange/EXOAvailabilityAddressSpace.md +++ b/docs/docs/resources/exchange/EXOAvailabilityAddressSpace.md @@ -5,10 +5,12 @@ | Parameter | Attribute | DataType | Description | Allowed Values | | --- | --- | --- | --- | --- | | **Identity** | Key | String | The Identity parameter specifies the AvailabilityAddressSpace you want to modify. | | -| **AccessMethod** | Write | String | The AccessMethod parameter specifies how the free/busy data is accessed. Valid values are:PerUserFB, OrgWideFB, OrgWideFBBasic,InternalProxy | `PerUserFB`, `OrgWideFB`, `OrgWideFBBasic`, `InternalProxy` | +| **AccessMethod** | Write | String | The AccessMethod parameter specifies how the free/busy data is accessed. Valid values are:PerUserFB, OrgWideFB, OrgWideFBToken, OrgWideFBBasic,InternalProxy | `PerUserFB`, `OrgWideFB`, `OrgWideFBToken`, `OrgWideFBBasic`, `InternalProxy` | | **Credentials** | Write | String | The Credentials parameter specifies the username and password that's used to access the Availability services in the target forest. | | | **ForestName** | Write | String | The ForestName parameter specifies the SMTP domain name of the target forest for users whose free/busy data must be retrieved. If your users are distributed among multiple SMTP domains in the target forest, run the Add-AvailabilityAddressSpace command once for each SMTP domain. | | | **TargetAutodiscoverEpr** | Write | String | The TargetAutodiscoverEpr parameter specifies the Autodiscover URL of Exchange Web Services for the external organization. Exchange uses Autodiscover to automatically detect the correct server endpoint for external requests. | | +| **TargetServiceEpr** | Write | String | The TargetServiceEpr parameter specifies the Exchange Online Calendar Service URL of the external Microsoft 365 organization that you're trying to read free/busy information from. | | +| **TargetTenantId** | Write | String | The TargetTenantID parameter specifies the tenant ID of the external Microsoft 365 organization that you're trying to read free/busy information from. | | | **Ensure** | Write | String | Specifies if this AvailabilityAddressSpace should exist. | `Present`, `Absent` | | **Credential** | Write | PSCredential | Credentials of the Exchange Global Admin | | | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | @@ -60,9 +62,10 @@ Configuration Example EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFB' + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'o365dsc.onmicrosoft.com' Ensure = 'Present' Credential = $Credscredential } @@ -92,9 +95,10 @@ Configuration Example EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFBBasic' # Updated Property + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'contoso.onmicrosoft.com' # Updated Property Ensure = 'Present' Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXODataEncryptionPolicy.md b/docs/docs/resources/exchange/EXODataEncryptionPolicy.md index 623f2893c4..50e4fe308e 100644 --- a/docs/docs/resources/exchange/EXODataEncryptionPolicy.md +++ b/docs/docs/resources/exchange/EXODataEncryptionPolicy.md @@ -45,66 +45,6 @@ To authenticate with Microsoft Exchange, this resource required the following pe This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline. -```powershell -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXODataEncryptionPolicy 'ConfigureDataEncryptionPolicy' - { - Identity = 'US Mailboxes' - Name = 'All US Mailboxes' - Description = 'All Mailboxes of users in the US' - Enabled = $true - Ensure = "Present" - Credential = $Credscredential - } - } -} -``` - -### Example 2 - -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. - -```powershell -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXODataEncryptionPolicy 'ConfigureDataEncryptionPolicy' - { - Identity = 'US Mailboxes' - Name = 'All US Mailboxes' - Description = 'All Mailboxes of users in the US. Updated' # Updated Property - Enabled = $true - Ensure = "Present" - Credential = $Credscredential - } - } -} -``` - -### Example 3 - -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. - ```powershell Configuration Example { diff --git a/docs/docs/resources/exchange/EXODistributionGroup.md b/docs/docs/resources/exchange/EXODistributionGroup.md index d690f1b53f..27939036b9 100644 --- a/docs/docs/resources/exchange/EXODistributionGroup.md +++ b/docs/docs/resources/exchange/EXODistributionGroup.md @@ -110,7 +110,6 @@ Configuration Example ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; @@ -154,7 +153,6 @@ Configuration Example ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; diff --git a/docs/docs/resources/exchange/EXODkimSigningConfig.md b/docs/docs/resources/exchange/EXODkimSigningConfig.md index c4811b04ff..42bb473064 100644 --- a/docs/docs/resources/exchange/EXODkimSigningConfig.md +++ b/docs/docs/resources/exchange/EXODkimSigningConfig.md @@ -55,12 +55,13 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXODkimSigningConfig 'ConfigureDKIMSigning' { KeySize = 1024 - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain HeaderCanonicalization = "Relaxed" Enabled = $True BodyCanonicalization = "Relaxed" @@ -87,12 +88,13 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXODkimSigningConfig 'ConfigureDKIMSigning' { KeySize = 1024 - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain HeaderCanonicalization = "Relaxed" Enabled = $False # Updated Property BodyCanonicalization = "Relaxed" @@ -119,11 +121,12 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXODkimSigningConfig 'ConfigureDKIMSigning' { - Identity = 'contoso.onmicrosoft.com' + Identity = $Domain Ensure = "Absent" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOGlobalAddressList.md b/docs/docs/resources/exchange/EXOGlobalAddressList.md index e414e0b0cb..3f0066ea00 100644 --- a/docs/docs/resources/exchange/EXOGlobalAddressList.md +++ b/docs/docs/resources/exchange/EXOGlobalAddressList.md @@ -78,6 +78,7 @@ Configuration Example ConditionalCompany = "Contoso" ConditionalDepartment = "Human Resources" ConditionalStateOrProvince = "Washington" + IncludedRecipients = 'AllRecipients' Ensure = "Present" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOHostedConnectionFilterPolicy.md b/docs/docs/resources/exchange/EXOHostedConnectionFilterPolicy.md index 448373b0b7..80fc3a0d28 100644 --- a/docs/docs/resources/exchange/EXOHostedConnectionFilterPolicy.md +++ b/docs/docs/resources/exchange/EXOHostedConnectionFilterPolicy.md @@ -59,44 +59,12 @@ Configuration Example { EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' { - Identity = "Integration Policy" - AdminDisplayName = "" - EnableSafeList = $False - IPAllowList = @() - IPBlockList = @() - MakeDefault = $False - Ensure = "Present" - Credential = $Credscredential - } - } -} -``` - -### Example 2 - -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. - -```powershell -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' - { - Identity = "Integration Policy" + Identity = "Default" AdminDisplayName = "" EnableSafeList = $True # Updated Property IPAllowList = @() IPBlockList = @() - MakeDefault = $False + MakeDefault = $True Ensure = "Present" Credential = $Credscredential } @@ -104,30 +72,3 @@ Configuration Example } ``` -### Example 3 - -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. - -```powershell -Configuration Example -{ - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXOHostedConnectionFilterPolicy 'ConfigureHostedConnectionFilterPolicy' - { - Identity = "Integration Policy" - Ensure = "Absent" - Credential = $Credscredential - } - } -} -``` - diff --git a/docs/docs/resources/exchange/EXOHostedContentFilterPolicy.md b/docs/docs/resources/exchange/EXOHostedContentFilterPolicy.md index 7bbe7e47f3..5602e6275a 100644 --- a/docs/docs/resources/exchange/EXOHostedContentFilterPolicy.md +++ b/docs/docs/resources/exchange/EXOHostedContentFilterPolicy.md @@ -111,12 +111,8 @@ Configuration Example BulkSpamAction = "MoveToJmf" BulkThreshold = 7 DownloadLink = $False - EnableEndUserSpamNotifications = $False EnableLanguageBlockList = $False EnableRegionBlockList = $False - EndUserSpamNotificationCustomSubject = "" - EndUserSpamNotificationFrequency = 3 - EndUserSpamNotificationLanguage = "Default" HighConfidencePhishAction = "Quarantine" HighConfidenceSpamAction = "MoveToJmf" IncreaseScoreWithBizOrInfoUrls = "Off" @@ -125,7 +121,7 @@ Configuration Example IncreaseScoreWithRedirectToOtherPort = "Off" InlineSafetyTipsEnabled = $True LanguageBlockList = @() - MakeDefault = $True + MakeDefault = $False MarkAsSpamBulkMail = "On" MarkAsSpamEmbedTagsInHtml = "Off" MarkAsSpamEmptyMessages = "Off" @@ -180,12 +176,8 @@ Configuration Example BulkSpamAction = "MoveToJmf" BulkThreshold = 7 DownloadLink = $True # Updated Property - EnableEndUserSpamNotifications = $False EnableLanguageBlockList = $False EnableRegionBlockList = $False - EndUserSpamNotificationCustomSubject = "" - EndUserSpamNotificationFrequency = 3 - EndUserSpamNotificationLanguage = "Default" HighConfidencePhishAction = "Quarantine" HighConfidenceSpamAction = "MoveToJmf" IncreaseScoreWithBizOrInfoUrls = "Off" @@ -194,7 +186,7 @@ Configuration Example IncreaseScoreWithRedirectToOtherPort = "Off" InlineSafetyTipsEnabled = $True LanguageBlockList = @() - MakeDefault = $True + MakeDefault = $False MarkAsSpamBulkMail = "On" MarkAsSpamEmbedTagsInHtml = "Off" MarkAsSpamEmptyMessages = "Off" diff --git a/docs/docs/resources/exchange/EXOHostedContentFilterRule.md b/docs/docs/resources/exchange/EXOHostedContentFilterRule.md index 132f2f6de7..fbfb48f062 100644 --- a/docs/docs/resources/exchange/EXOHostedContentFilterRule.md +++ b/docs/docs/resources/exchange/EXOHostedContentFilterRule.md @@ -61,14 +61,16 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" Comments = "Applies to all users, except when member of HR group" Enabled = $True - ExceptIfSentToMemberOf = "Contoso Human Resources" + ExceptIfSentToMemberOf = "LegalTeam@$Domain" + RecipientDomainIs = @('contoso.com') HostedContentFilterPolicy = "Integration CFP" Ensure = "Present" Credential = $Credscredential @@ -93,14 +95,16 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" Comments = "Applies to all users, except when member of HR group" Enabled = $False # Updated Property - ExceptIfSentToMemberOf = "Contoso Human Resources" + ExceptIfSentToMemberOf = "LegalTeam@$Domain" + RecipientDomainIs = @('contoso.com') HostedContentFilterPolicy = "Integration CFP" Ensure = "Present" Credential = $Credscredential @@ -129,7 +133,7 @@ Configuration Example { EXOHostedContentFilterRule 'ConfigureHostedContentFilterRule' { - Identity = "Contoso Recipients" + Identity = "Integration CFR" HostedContentFilterPolicy = "Integration CFP" Ensure = "Absent" Credential = $Credscredential diff --git a/docs/docs/resources/exchange/EXOHostedOutboundSpamFilterRule.md b/docs/docs/resources/exchange/EXOHostedOutboundSpamFilterRule.md index 1bd032a9a1..6aaeb4d7af 100644 --- a/docs/docs/resources/exchange/EXOHostedOutboundSpamFilterRule.md +++ b/docs/docs/resources/exchange/EXOHostedOutboundSpamFilterRule.md @@ -61,6 +61,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' @@ -68,7 +69,8 @@ Configuration Example Identity = "Contoso Executives" Comments = "Does not apply to Executives" Enabled = $True - ExceptIfFrom = "John Smith" + ExceptIfFrom = "AdeleV@$Domain" + FromMemberOf = "Executives@$Domain" HostedOutboundSpamFilterPolicy = "Integration SFP" Ensure = "Present" Credential = $Credscredential @@ -93,6 +95,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' @@ -100,7 +103,8 @@ Configuration Example Identity = "Contoso Executives" Comments = "Does not apply to Executives" Enabled = $False # Updated Property - ExceptIfFrom = "John Smith" + ExceptIfFrom = "AdeleV@$Domain" + FromMemberOf = "Executives@$Domain" HostedOutboundSpamFilterPolicy = "Integration SFP" Ensure = "Present" Credential = $Credscredential @@ -125,6 +129,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOHostedOutboundSpamFilterRule 'ConfigureHostedOutboundSpamFilterRule' diff --git a/docs/docs/resources/exchange/EXOInboundConnector.md b/docs/docs/resources/exchange/EXOInboundConnector.md index 1bc2741078..e8436e812a 100644 --- a/docs/docs/resources/exchange/EXOInboundConnector.md +++ b/docs/docs/resources/exchange/EXOInboundConnector.md @@ -70,16 +70,15 @@ Configuration Example { EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" - CloudServicesMailEnabled = $True - Comment = "Inbound connector for Contoso" + Identity = "Integration Inbound Connector" + CloudServicesMailEnabled = $False + Comment = "Inbound connector for Integration" ConnectorSource = "Default" - ConnectorType = "OnPremises" + ConnectorType = "Partner" Enabled = $True RequireTls = $True SenderDomains = "*.contoso.com" TlsSenderCertificateName = "contoso.com" - TreatMessagesAsInternal = $True Ensure = "Present" Credential = $Credscredential } @@ -107,16 +106,15 @@ Configuration Example { EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" - CloudServicesMailEnabled = $True - Comment = "Inbound connector for Contoso" + Identity = "Integration Inbound Connector" + CloudServicesMailEnabled = $False + Comment = "Inbound connector for Integration" ConnectorSource = "Default" - ConnectorType = "OnPremises" + ConnectorType = "Partner" Enabled = $False # Updated Property RequireTls = $True SenderDomains = "*.contoso.com" TlsSenderCertificateName = "contoso.com" - TreatMessagesAsInternal = $True Ensure = "Present" Credential = $Credscredential } @@ -144,7 +142,7 @@ Configuration Example { EXOInboundConnector 'ConfigureInboundConnector' { - Identity = "Contoso Inbound Connector" + Identity = "Integration Inbound Connector" Ensure = "Absent" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOIntraOrganizationConnector.md b/docs/docs/resources/exchange/EXOIntraOrganizationConnector.md index 6bcf11c824..5aae4b5039 100644 --- a/docs/docs/resources/exchange/EXOIntraOrganizationConnector.md +++ b/docs/docs/resources/exchange/EXOIntraOrganizationConnector.md @@ -59,7 +59,7 @@ Configuration Example EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $True Ensure = "Present" @@ -90,7 +90,7 @@ Configuration Example EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $False # Updated Property Ensure = "Present" diff --git a/docs/docs/resources/exchange/EXOMailContact.md b/docs/docs/resources/exchange/EXOMailContact.md index 063608382f..923a2d051c 100644 --- a/docs/docs/resources/exchange/EXOMailContact.md +++ b/docs/docs/resources/exchange/EXOMailContact.md @@ -101,7 +101,7 @@ Configuration Example ModeratedBy = @() ModerationEnabled = $false Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $true CustomAttribute1 = 'Custom Value 1' @@ -142,7 +142,7 @@ Configuration Example ModeratedBy = @() ModerationEnabled = $false Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $false # Updated Property CustomAttribute1 = 'Custom Value 1' @@ -178,7 +178,7 @@ Configuration Example Ensure = 'Absent' ExternalEmailAddress = 'SMTP:test@tailspintoys.com' Name = 'My Test Contact' - OrganizationalUnit = "nampr03a010.prod.outlook.com/Microsoft Exchange Hosted Organizations/$Domain" + OrganizationalUnit = $Domain SendModerationNotifications = 'Always' UsePreferMessageFormat = $false # Updated Property CustomAttribute1 = 'Custom Value 1' diff --git a/docs/docs/resources/exchange/EXOManagementRole.md b/docs/docs/resources/exchange/EXOManagementRole.md index 410976566f..5e64a9d88a 100644 --- a/docs/docs/resources/exchange/EXOManagementRole.md +++ b/docs/docs/resources/exchange/EXOManagementRole.md @@ -51,13 +51,14 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRole 'ConfigureManagementRole' { Name = "MyDisplayName" Description = "" - Parent = "contoso.onmicrosoft.com\MyProfileInformation" + Parent = "$Domain\MyProfileInformation" Ensure = "Present" Credential = $Credscredential } @@ -80,13 +81,14 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRole 'ConfigureManagementRole' { Name = "MyDisplayName" Description = "Updated Description" # Updated Property - Parent = "contoso.onmicrosoft.com\MyProfileInformation" + Parent = "$Domain\MyProfileInformation" Ensure = "Present" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOManagementRoleAssignment.md b/docs/docs/resources/exchange/EXOManagementRoleAssignment.md index d9ee8fa96c..2ea3b0bb4a 100644 --- a/docs/docs/resources/exchange/EXOManagementRoleAssignment.md +++ b/docs/docs/resources/exchange/EXOManagementRoleAssignment.md @@ -60,6 +60,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRoleAssignment 'AssignManagementRole' @@ -68,7 +69,7 @@ Configuration Example Ensure = "Present"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AdeleV"; + User = "AdeleV@$Domain"; } } } @@ -89,6 +90,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRoleAssignment 'AssignManagementRole' @@ -97,7 +99,7 @@ Configuration Example Ensure = "Present"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AlexW"; # Updated Property + User = "AlexW@$Domain"; # Updated Property } } } @@ -118,6 +120,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOManagementRoleAssignment 'AssignManagementRole' @@ -126,7 +129,7 @@ Configuration Example Ensure = "Absent"; Name = "MyManagementRoleAssignment"; Role = "UserApplication"; - User = "AlexW"; # Updated Property + User = "AlexW@$Domain"; # Updated Property } } } diff --git a/docs/docs/resources/exchange/EXOOfflineAddressBook.md b/docs/docs/resources/exchange/EXOOfflineAddressBook.md index eb4f547b2a..cdadd9da05 100644 --- a/docs/docs/resources/exchange/EXOOfflineAddressBook.md +++ b/docs/docs/resources/exchange/EXOOfflineAddressBook.md @@ -61,7 +61,6 @@ Configuration Example { Name = "Integration Address Book" AddressLists = @('\Offline Global Address List') - ConfiguredAttributes = @('OfficeLocation, ANR', 'ProxyAddresses, ANR', 'PhoneticGivenName, ANR', 'GivenName, ANR', 'PhoneticSurname, ANR', 'Surname, ANR', 'Account, ANR', 'PhoneticDisplayName, ANR', 'UserInformationDisplayName, ANR', 'ExternalMemberCount, Value', 'TotalMemberCount, Value', 'ModerationEnabled, Value', 'DelivContLength, Value', 'MailTipTranslations, Value', 'ObjectGuid, Value', 'IsOrganizational, Value', 'HabSeniorityIndex, Value', 'DisplayTypeEx, Value', 'SimpleDisplayNameAnsi, Value', 'HomeMdbA, Value', 'Certificate, Value', 'UserSMimeCertificate, Value', 'UserCertificate, Value', 'Comment, Value', 'PagerTelephoneNumber, Value', 'AssistantTelephoneNumber, Value', 'MobileTelephoneNumber, Value', 'PrimaryFaxNumber, Value', 'Home2TelephoneNumberMv, Value', 'Business2TelephoneNumberMv, Value', 'HomeTelephoneNumber, Value', 'TargetAddress, Value', 'PhoneticDepartmentName, Value', 'DepartmentName, Value', 'Assistant, Value', 'PhoneticCompanyName, Value', 'CompanyName, Value', 'Title, Value', 'Country, Value', 'PostalCode, Value', 'StateOrProvince, Value', 'Locality, Value', 'StreetAddress, Value', 'Initials, Value', 'BusinessTelephoneNumber, Value', 'SendRichInfo, Value', 'ObjectType, Value', 'DisplayType, Value', 'RejectMessagesFromDLMembers, Indicator', 'AcceptMessagesOnlyFromDLMembers, Indicator', 'RejectMessagesFrom, Indicator', 'AcceptMessagesOnlyFrom, Indicator', 'UmSpokenName, Indicator', 'ThumbnailPhoto, Indicator') DiffRetentionPeriod = "30" IsDefault = $true Ensure = "Present" @@ -94,7 +93,7 @@ Configuration Example { Name = "Integration Address Book" AddressLists = @('\Offline Global Address List') - ConfiguredAttributes = @('OfficeLocation, ANR', 'ProxyAddresses, ANR', 'PhoneticGivenName, ANR', 'GivenName, ANR', 'PhoneticSurname, ANR', 'Surname, ANR', 'Account, ANR', 'PhoneticDisplayName, ANR', 'UserInformationDisplayName, ANR', 'ExternalMemberCount, Value', 'TotalMemberCount, Value', 'ModerationEnabled, Value', 'DelivContLength, Value', 'MailTipTranslations, Value', 'ObjectGuid, Value', 'IsOrganizational, Value', 'HabSeniorityIndex, Value', 'DisplayTypeEx, Value', 'SimpleDisplayNameAnsi, Value', 'HomeMdbA, Value', 'Certificate, Value', 'UserSMimeCertificate, Value', 'UserCertificate, Value', 'Comment, Value', 'PagerTelephoneNumber, Value', 'AssistantTelephoneNumber, Value', 'MobileTelephoneNumber, Value', 'PrimaryFaxNumber, Value', 'Home2TelephoneNumberMv, Value', 'Business2TelephoneNumberMv, Value', 'HomeTelephoneNumber, Value', 'TargetAddress, Value', 'PhoneticDepartmentName, Value', 'DepartmentName, Value', 'Assistant, Value', 'PhoneticCompanyName, Value', 'CompanyName, Value', 'Title, Value', 'Country, Value', 'PostalCode, Value', 'StateOrProvince, Value', 'Locality, Value', 'StreetAddress, Value', 'Initials, Value', 'BusinessTelephoneNumber, Value', 'SendRichInfo, Value', 'ObjectType, Value', 'DisplayType, Value', 'RejectMessagesFromDLMembers, Indicator', 'AcceptMessagesOnlyFromDLMembers, Indicator', 'RejectMessagesFrom, Indicator', 'AcceptMessagesOnlyFrom, Indicator', 'UmSpokenName, Indicator', 'ThumbnailPhoto, Indicator') + ConfiguredAttributes = @('OfficeLocation, ANR','ProxyAddresses, ANR','PhoneticGivenName, ANR','GivenName, ANR','PhoneticSurname, ANR','Surname, ANR','Account, ANR','PhoneticDisplayName, ANR','ExternalDirectoryObjectId, Value','ExternalMemberCount, Value','TotalMemberCount, Value','ModerationEnabled, Value','MailboxGuid, Value','DelivContLength, Value','MailTipTranslations, Value','ObjectGuid, Value','DisplayTypeEx, Value','DisplayNamePrintableAnsi, Value','HomeMdbA, Value','Certificate, Value','UserSMimeCertificate, Value','UserCertificate, Value','Comment, Value','PagerTelephoneNumber, Value','AssistantTelephoneNumber, Value','MobileTelephoneNumber, Value','PrimaryFaxNumber, Value','Home2TelephoneNumberMv, Value','Business2TelephoneNumberMv, Value','HomeTelephoneNumber, Value','TargetAddress, Value','PhoneticDepartmentName, Value','DepartmentName, Value','Assistant, Value','PhoneticCompanyName, Value','CompanyName, Value','Title, Value','Country, Value','PostalCode, Value','StateOrProvince, Value','Locality, Value','StreetAddress, Value','Initials, Value','BusinessTelephoneNumber, Value','SendRichInfo, Value','ObjectType, Value','DisplayType, Value','RejectMessagesFromDLMembers, Indicator','AcceptMessagesOnlyFromDLMembers, Indicator','RejectMessagesFrom, Indicator','AcceptMessagesOnlyFrom, Indicator','UmSpokenName, Indicator','ThumbnailPhoto, Indicator') DiffRetentionPeriod = "30" IsDefault = $false # Updated Property Ensure = "Present" diff --git a/docs/docs/resources/exchange/EXOOnPremisesOrganization.md b/docs/docs/resources/exchange/EXOOnPremisesOrganization.md index 9ad83d1e9d..9a5dcd5078 100644 --- a/docs/docs/resources/exchange/EXOOnPremisesOrganization.md +++ b/docs/docs/resources/exchange/EXOOnPremisesOrganization.md @@ -62,15 +62,34 @@ Configuration Example { EXOOnPremisesOrganization 'ConfigureOnPremisesOrganization' { - Identity = 'Contoso' + Identity = 'Integration' Comment = 'Mail for Contoso' - HybridDomains = 'contoso.com', 'sales.contoso.com' - InboundConnector = 'Inbound to Contoso' - OrganizationGuid = 'a1bc23cb-3456-bcde-abcd-feb363cacc88' - OrganizationName = 'Contoso' - OutboundConnector = 'Outbound to Contoso' + HybridDomains = 'o365dsc.onmicrosoft.com' + InboundConnector = 'Integration Inbound Connector' + OrganizationGuid = 'e7a80bcf-696e-40ca-8775-a7f85fbb3ebc' + OrganizationName = 'O365DSC' + OutboundConnector = 'Contoso Outbound Connector' Ensure = 'Present' Credential = $Credscredential + DependsOn = "[EXOOutboundConnector]OutboundDependency" + } + EXOOutboundConnector 'OutboundDependency' + { + Identity = "Contoso Outbound Connector" + AllAcceptedDomains = $False + CloudServicesMailEnabled = $False + Comment = "Outbound connector to Contoso" + ConnectorSource = "Default" + ConnectorType = "Partner" + Enabled = $True + IsTransportRuleScoped = $False + RecipientDomains = "contoso.com" + RouteAllMessagesViaOnPremises = $False + TlsDomain = "*.contoso.com" + TlsSettings = "DomainValidation" + UseMxRecord = $True + Ensure = "Present" + Credential = $Credscredential } } } diff --git a/docs/docs/resources/exchange/EXOOutboundConnector.md b/docs/docs/resources/exchange/EXOOutboundConnector.md index 6f0d1388fe..ff0efa22cc 100644 --- a/docs/docs/resources/exchange/EXOOutboundConnector.md +++ b/docs/docs/resources/exchange/EXOOutboundConnector.md @@ -71,15 +71,15 @@ Configuration Example EXOOutboundConnector 'ConfigureOutboundConnector' { Identity = "Contoso Outbound Connector" - AllAcceptedDomains = $True - CloudServicesMailEnabled = $True + AllAcceptedDomains = $False + CloudServicesMailEnabled = $False Comment = "Outbound connector to Contoso" ConnectorSource = "Default" - ConnectorType = "OnPremises" - Enabled = $True - IsTransportRuleScoped = $True - RecipientDomains = "*.contoso.com" - RouteAllMessagesViaOnPremises = $True + ConnectorType = "Partner" + Enabled = $False # Updated Property + IsTransportRuleScoped = $False + RecipientDomains = "contoso.com" + RouteAllMessagesViaOnPremises = $False TlsDomain = "*.contoso.com" TlsSettings = "DomainValidation" UseMxRecord = $True @@ -95,46 +95,6 @@ Configuration Example This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline. -```powershell -Configuration Example -{ - param - ( - [Parameter(Mandatory = $true)] - [PSCredential] - $Credscredential - ) - Import-DscResource -ModuleName Microsoft365DSC - - node localhost - { - EXOOutboundConnector 'ConfigureOutboundConnector' - { - Identity = "Contoso Outbound Connector" - AllAcceptedDomains = $True - CloudServicesMailEnabled = $True - Comment = "Outbound connector to Contoso" - ConnectorSource = "Default" - ConnectorType = "OnPremises" - Enabled = $False # Updated Property - IsTransportRuleScoped = $True - RecipientDomains = "*.contoso.com" - RouteAllMessagesViaOnPremises = $True - TlsDomain = "*.contoso.com" - TlsSettings = "DomainValidation" - UseMxRecord = $True - Ensure = "Present" - Credential = $Credscredential - } - } -} -``` - -### Example 3 - -This example is used to test new resources and showcase the usage of new resources being worked on. -It is not meant to use as a production baseline. - ```powershell Configuration Example { diff --git a/docs/docs/resources/exchange/EXOPartnerApplication.md b/docs/docs/resources/exchange/EXOPartnerApplication.md index 3370ee3f64..e7830f4f35 100644 --- a/docs/docs/resources/exchange/EXOPartnerApplication.md +++ b/docs/docs/resources/exchange/EXOPartnerApplication.md @@ -61,7 +61,6 @@ Configuration Example { Name = "HRApp" ApplicationIdentifier = "00000006-0000-0dd1-ac00-000000000000" - AccountType = "OrganizationalAccount" Enabled = $True Ensure = "Present" Credential = $Credscredential @@ -92,7 +91,6 @@ Configuration Example { Name = "HRApp" ApplicationIdentifier = "00000006-0000-0dd1-ac00-000000000000" - AccountType = "OrganizationalAccount" Enabled = $False # Updated Property Ensure = "Present" Credential = $Credscredential diff --git a/docs/docs/resources/exchange/EXOPlace.md b/docs/docs/resources/exchange/EXOPlace.md index 13d3b4eba4..23742979fc 100644 --- a/docs/docs/resources/exchange/EXOPlace.md +++ b/docs/docs/resources/exchange/EXOPlace.md @@ -78,12 +78,12 @@ Configuration Example EXOPlace 'TestPlace' { AudioDeviceName = "MyAudioDevice"; - Capacity = 15; #Drift + Capacity = 15; City = ""; Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Present' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; IsWheelChairAccessible = $True; MTREnabled = $False; ParentType = "None"; @@ -123,7 +123,7 @@ Configuration Example Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Present' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; IsWheelChairAccessible = $True; MTREnabled = $False; ParentType = "None"; @@ -161,7 +161,7 @@ Configuration Example Credential = $Credscredential DisplayDeviceName = "DisplayDeviceName"; Ensure = 'Absent' - Identity = "MyRoom@$Domain"; + Identity = "Hood@$Domain"; } } } diff --git a/docs/docs/resources/exchange/EXORemoteDomain.md b/docs/docs/resources/exchange/EXORemoteDomain.md index d8f1373597..3237473427 100644 --- a/docs/docs/resources/exchange/EXORemoteDomain.md +++ b/docs/docs/resources/exchange/EXORemoteDomain.md @@ -84,11 +84,11 @@ Configuration Example ContentType = "MimeHtmlText" DeliveryReportEnabled = $True DisplaySenderName = $True - DomainName = "*" + DomainName = "contoso.com" IsInternal = $False LineWrapSize = "Unlimited" MeetingForwardNotificationEnabled = $False - Name = "Default" + Name = "Integration" NonMimeCharacterSet = "iso-8859-1" PreferredInternetCodePageForShiftJis = "Undefined" TargetDeliveryDomain = $False @@ -130,9 +130,9 @@ Configuration Example ContentType = "MimeHtmlText" DeliveryReportEnabled = $True DisplaySenderName = $True - DomainName = "*" + DomainName = "contoso.com" IsInternal = $False - LineWrapSize = "Unlimited" + LineWrapSize = "Integration" MeetingForwardNotificationEnabled = $False Name = "Default" NonMimeCharacterSet = "iso-8859-1" diff --git a/docs/docs/resources/exchange/EXOSafeAttachmentRule.md b/docs/docs/resources/exchange/EXOSafeAttachmentRule.md index 9e4b1e9a27..1710116f10 100644 --- a/docs/docs/resources/exchange/EXOSafeAttachmentRule.md +++ b/docs/docs/resources/exchange/EXOSafeAttachmentRule.md @@ -60,6 +60,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeAttachmentRule 'ConfigureSafeAttachmentRule' @@ -67,9 +68,9 @@ Configuration Example Identity = "Research Department Attachment Rule" Comments = "Applies to Research Department, except managers" Enabled = $True - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeAttachmentPolicy = "Marketing Block Attachments" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } @@ -93,6 +94,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeAttachmentRule 'ConfigureSafeAttachmentRule' @@ -100,9 +102,9 @@ Configuration Example Identity = "Research Department Attachment Rule" Comments = "Applies to Research Department, except managers" Enabled = $False # Updated Property - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeAttachmentPolicy = "Marketing Block Attachments" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOSafeLinksPolicy.md b/docs/docs/resources/exchange/EXOSafeLinksPolicy.md index 55102a0a47..832c7ee845 100644 --- a/docs/docs/resources/exchange/EXOSafeLinksPolicy.md +++ b/docs/docs/resources/exchange/EXOSafeLinksPolicy.md @@ -76,7 +76,6 @@ Configuration Example EnableOrganizationBranding = $True EnableSafeLinksForTeams = $True ScanUrls = $True - UseTranslatedNotificationText = $True Ensure = 'Present' Credential = $Credscredential } @@ -111,7 +110,6 @@ Configuration Example EnableOrganizationBranding = $False # Updated Property EnableSafeLinksForTeams = $True ScanUrls = $True - UseTranslatedNotificationText = $True Ensure = 'Present' Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOSafeLinksRule.md b/docs/docs/resources/exchange/EXOSafeLinksRule.md index 7f6a684f88..a9db3a6dbe 100644 --- a/docs/docs/resources/exchange/EXOSafeLinksRule.md +++ b/docs/docs/resources/exchange/EXOSafeLinksRule.md @@ -60,6 +60,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeLinksRule 'ConfigureSafeLinksRule' @@ -67,9 +68,9 @@ Configuration Example Identity = "Research Department URL Rule" Comments = "Applies to Research Department, except managers" Enabled = $True - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeLinksPolicy = "Marketing Block URL" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } @@ -93,6 +94,7 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOSafeLinksRule 'ConfigureSafeLinksRule' @@ -100,9 +102,9 @@ Configuration Example Identity = "Research Department URL Rule" Comments = "Applies to Research Department, except managers" Enabled = $False # Updated Property - ExceptIfSentToMemberOf = "Research Department Managers" + ExceptIfSentToMemberOf = "Executives@$Domain" SafeLinksPolicy = "Marketing Block URL" - SentToMemberOf = "Research Department" + SentToMemberOf = "LegalTeam@$Domain" Ensure = "Present" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOSharedMailbox.md b/docs/docs/resources/exchange/EXOSharedMailbox.md index 75901ef81e..ff1c50ddc9 100644 --- a/docs/docs/resources/exchange/EXOSharedMailbox.md +++ b/docs/docs/resources/exchange/EXOSharedMailbox.md @@ -57,9 +57,10 @@ Configuration Example { EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain") + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain") + Alias = "IntegrationSM" Ensure = "Present" Credential = $Credscredential } @@ -87,9 +88,10 @@ Configuration Example { EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain", "AlexW@$Domain") # Updated Property + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain", "IntegrationSM2@$Domain") + Alias = "IntegrationSM" Ensure = "Present" Credential = $Credscredential } @@ -117,9 +119,10 @@ Configuration Example { EXOSharedMailbox 'SharedMailbox' { - DisplayName = "Test" - PrimarySMTPAddress = "Test@$Domain" - EmailAddresses = @("AdeleV@$Domain", "AlexW@$Domain") # Updated Property + DisplayName = "Integration" + PrimarySMTPAddress = "Integration@$Domain" + EmailAddresses = @("IntegrationSM@$Domain", "IntegrationSM2@$Domain") + Alias = "IntegrationSM" Ensure = "Absent" Credential = $Credscredential } diff --git a/docs/docs/resources/exchange/EXOTransportRule.md b/docs/docs/resources/exchange/EXOTransportRule.md index ddba9efe92..3625f100b5 100644 --- a/docs/docs/resources/exchange/EXOTransportRule.md +++ b/docs/docs/resources/exchange/EXOTransportRule.md @@ -217,14 +217,15 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOTransportRule 'ConfigureTransportRule' { - Name = "Ethical Wall - Sales and Brokerage Departments" - BetweenMemberOf1 = "Sales Department" - BetweenMemberOf2 = "Brokerage Department" - ExceptIfFrom = "Tony Smith","Pilar Ackerman" + Name = "Ethical Wall - Sales and Executives Departments" + BetweenMemberOf1 = "SalesTeam@$Domain" + BetweenMemberOf2 = "Executives@$Domain" + ExceptIfFrom = "AdeleV@$Domain" ExceptIfSubjectContainsWords = "Press Release","Corporate Communication" RejectMessageReasonText = "Messages sent between the Sales and Brokerage departments are strictly prohibited." Enabled = $True @@ -251,17 +252,18 @@ Configuration Example ) Import-DscResource -ModuleName Microsoft365DSC + $Domain = $Credscredential.Username.Split('@')[1] node localhost { EXOTransportRule 'ConfigureTransportRule' { - Name = "Ethical Wall - Sales and Brokerage Departments" - BetweenMemberOf1 = "Sales Department" - BetweenMemberOf2 = "Brokerage Department" - ExceptIfFrom = "Tony Smith","Pilar Ackerman" + Name = "Ethical Wall - Sales and Executives Departments" + BetweenMemberOf1 = "SalesTeam@$Domain" + BetweenMemberOf2 = "Executives@$Domain" + ExceptIfFrom = "AdeleV@$Domain" ExceptIfSubjectContainsWords = "Press Release","Corporate Communication" - RejectMessageReasonText = "Updated" # Updated Property - Enabled = $True + RejectMessageReasonText = "Messages sent between the Sales and Brokerage departments are strictly prohibited." + Enabled = $False # Updated Property Ensure = "Present" Credential = $Credscredential } diff --git a/docs/docs/resources/teams/TeamsAppPermissionPolicy.md b/docs/docs/resources/teams/TeamsAppPermissionPolicy.md index 964b8afe99..adea192f37 100644 --- a/docs/docs/resources/teams/TeamsAppPermissionPolicy.md +++ b/docs/docs/resources/teams/TeamsAppPermissionPolicy.md @@ -17,6 +17,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsAppSetupPolicy.md b/docs/docs/resources/teams/TeamsAppSetupPolicy.md index 84b58adb0b..4b367832d3 100644 --- a/docs/docs/resources/teams/TeamsAppSetupPolicy.md +++ b/docs/docs/resources/teams/TeamsAppSetupPolicy.md @@ -17,6 +17,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsAudioConferencingPolicy.md b/docs/docs/resources/teams/TeamsAudioConferencingPolicy.md index 1e95f04a16..58aa90102e 100644 --- a/docs/docs/resources/teams/TeamsAudioConferencingPolicy.md +++ b/docs/docs/resources/teams/TeamsAudioConferencingPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsCallHoldPolicy.md b/docs/docs/resources/teams/TeamsCallHoldPolicy.md index 11659cc00a..58c8c000f3 100644 --- a/docs/docs/resources/teams/TeamsCallHoldPolicy.md +++ b/docs/docs/resources/teams/TeamsCallHoldPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsCallParkPolicy.md b/docs/docs/resources/teams/TeamsCallParkPolicy.md index c5ead27b46..2ae81d96be 100644 --- a/docs/docs/resources/teams/TeamsCallParkPolicy.md +++ b/docs/docs/resources/teams/TeamsCallParkPolicy.md @@ -15,6 +15,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsCallQueue.md b/docs/docs/resources/teams/TeamsCallQueue.md index 485d73fe4b..6c93ecf12f 100644 --- a/docs/docs/resources/teams/TeamsCallQueue.md +++ b/docs/docs/resources/teams/TeamsCallQueue.md @@ -57,6 +57,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsCallingPolicy.md b/docs/docs/resources/teams/TeamsCallingPolicy.md index f316b2c8a1..53978c5ba9 100644 --- a/docs/docs/resources/teams/TeamsCallingPolicy.md +++ b/docs/docs/resources/teams/TeamsCallingPolicy.md @@ -30,6 +30,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsChannel.md b/docs/docs/resources/teams/TeamsChannel.md index 58fb5741f4..2377089868 100644 --- a/docs/docs/resources/teams/TeamsChannel.md +++ b/docs/docs/resources/teams/TeamsChannel.md @@ -14,6 +14,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsChannelTab.md b/docs/docs/resources/teams/TeamsChannelTab.md index 928df670ae..2c232a3b26 100644 --- a/docs/docs/resources/teams/TeamsChannelTab.md +++ b/docs/docs/resources/teams/TeamsChannelTab.md @@ -19,6 +19,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsChannelsPolicy.md b/docs/docs/resources/teams/TeamsChannelsPolicy.md index 04569feb57..279c5730af 100644 --- a/docs/docs/resources/teams/TeamsChannelsPolicy.md +++ b/docs/docs/resources/teams/TeamsChannelsPolicy.md @@ -17,6 +17,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsClientConfiguration.md b/docs/docs/resources/teams/TeamsClientConfiguration.md index d103786a7f..091eb128b1 100644 --- a/docs/docs/resources/teams/TeamsClientConfiguration.md +++ b/docs/docs/resources/teams/TeamsClientConfiguration.md @@ -23,6 +23,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsComplianceRecordingPolicy.md b/docs/docs/resources/teams/TeamsComplianceRecordingPolicy.md index 26161a2add..c82b70a65f 100644 --- a/docs/docs/resources/teams/TeamsComplianceRecordingPolicy.md +++ b/docs/docs/resources/teams/TeamsComplianceRecordingPolicy.md @@ -15,6 +15,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsCortanaPolicy.md b/docs/docs/resources/teams/TeamsCortanaPolicy.md index 5a839ca4d3..1662b06d23 100644 --- a/docs/docs/resources/teams/TeamsCortanaPolicy.md +++ b/docs/docs/resources/teams/TeamsCortanaPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsDialInConferencingTenantSettings.md b/docs/docs/resources/teams/TeamsDialInConferencingTenantSettings.md index abd82e30cb..3dfe805be0 100644 --- a/docs/docs/resources/teams/TeamsDialInConferencingTenantSettings.md +++ b/docs/docs/resources/teams/TeamsDialInConferencingTenantSettings.md @@ -18,6 +18,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | # TeamsUserCallingSettings diff --git a/docs/docs/resources/teams/TeamsEmergencyCallRoutingPolicy.md b/docs/docs/resources/teams/TeamsEmergencyCallRoutingPolicy.md index fab9c4562a..bbc4015b73 100644 --- a/docs/docs/resources/teams/TeamsEmergencyCallRoutingPolicy.md +++ b/docs/docs/resources/teams/TeamsEmergencyCallRoutingPolicy.md @@ -13,6 +13,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ### MSFT_TeamsEmergencyNumber diff --git a/docs/docs/resources/teams/TeamsEmergencyCallingPolicy.md b/docs/docs/resources/teams/TeamsEmergencyCallingPolicy.md index 659bd3f1a2..9acf97d8f0 100644 --- a/docs/docs/resources/teams/TeamsEmergencyCallingPolicy.md +++ b/docs/docs/resources/teams/TeamsEmergencyCallingPolicy.md @@ -16,6 +16,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsEnhancedEncryptionPolicy.md b/docs/docs/resources/teams/TeamsEnhancedEncryptionPolicy.md index 3c6252cb3e..6936115dad 100644 --- a/docs/docs/resources/teams/TeamsEnhancedEncryptionPolicy.md +++ b/docs/docs/resources/teams/TeamsEnhancedEncryptionPolicy.md @@ -13,6 +13,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsEventsPolicy.md b/docs/docs/resources/teams/TeamsEventsPolicy.md index d9b751fec2..3191a689fa 100644 --- a/docs/docs/resources/teams/TeamsEventsPolicy.md +++ b/docs/docs/resources/teams/TeamsEventsPolicy.md @@ -21,6 +21,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsFederationConfiguration.md b/docs/docs/resources/teams/TeamsFederationConfiguration.md index 19942ea24c..90e9481a2f 100644 --- a/docs/docs/resources/teams/TeamsFederationConfiguration.md +++ b/docs/docs/resources/teams/TeamsFederationConfiguration.md @@ -18,6 +18,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsFeedbackPolicy.md b/docs/docs/resources/teams/TeamsFeedbackPolicy.md index d0c7c3c845..e85811f97d 100644 --- a/docs/docs/resources/teams/TeamsFeedbackPolicy.md +++ b/docs/docs/resources/teams/TeamsFeedbackPolicy.md @@ -16,6 +16,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsFilesPolicy.md b/docs/docs/resources/teams/TeamsFilesPolicy.md index 1bd8c17558..e9986b58a8 100644 --- a/docs/docs/resources/teams/TeamsFilesPolicy.md +++ b/docs/docs/resources/teams/TeamsFilesPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsGroupPolicyAssignment.md b/docs/docs/resources/teams/TeamsGroupPolicyAssignment.md index 8743770292..6bab7bfdd3 100644 --- a/docs/docs/resources/teams/TeamsGroupPolicyAssignment.md +++ b/docs/docs/resources/teams/TeamsGroupPolicyAssignment.md @@ -14,6 +14,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsGuestCallingConfiguration.md b/docs/docs/resources/teams/TeamsGuestCallingConfiguration.md index 13408c8e25..9f72539d71 100644 --- a/docs/docs/resources/teams/TeamsGuestCallingConfiguration.md +++ b/docs/docs/resources/teams/TeamsGuestCallingConfiguration.md @@ -10,6 +10,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsGuestMeetingConfiguration.md b/docs/docs/resources/teams/TeamsGuestMeetingConfiguration.md index 5ecba7f55f..5aad313ee1 100644 --- a/docs/docs/resources/teams/TeamsGuestMeetingConfiguration.md +++ b/docs/docs/resources/teams/TeamsGuestMeetingConfiguration.md @@ -13,6 +13,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsGuestMessagingConfiguration.md b/docs/docs/resources/teams/TeamsGuestMessagingConfiguration.md index c37379f7ef..0e2e710589 100644 --- a/docs/docs/resources/teams/TeamsGuestMessagingConfiguration.md +++ b/docs/docs/resources/teams/TeamsGuestMessagingConfiguration.md @@ -18,6 +18,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsIPPhonePolicy.md b/docs/docs/resources/teams/TeamsIPPhonePolicy.md index 7821f34895..33c3137d97 100644 --- a/docs/docs/resources/teams/TeamsIPPhonePolicy.md +++ b/docs/docs/resources/teams/TeamsIPPhonePolicy.md @@ -17,6 +17,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsMeetingBroadcastConfiguration.md b/docs/docs/resources/teams/TeamsMeetingBroadcastConfiguration.md index 4a642c8b81..a8aa7c45fc 100644 --- a/docs/docs/resources/teams/TeamsMeetingBroadcastConfiguration.md +++ b/docs/docs/resources/teams/TeamsMeetingBroadcastConfiguration.md @@ -15,6 +15,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsMeetingBroadcastPolicy.md b/docs/docs/resources/teams/TeamsMeetingBroadcastPolicy.md index f6f4d23f1e..51d09e22e0 100644 --- a/docs/docs/resources/teams/TeamsMeetingBroadcastPolicy.md +++ b/docs/docs/resources/teams/TeamsMeetingBroadcastPolicy.md @@ -14,6 +14,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsMeetingConfiguration.md b/docs/docs/resources/teams/TeamsMeetingConfiguration.md index fd463d1e0c..e72dbf2ef4 100644 --- a/docs/docs/resources/teams/TeamsMeetingConfiguration.md +++ b/docs/docs/resources/teams/TeamsMeetingConfiguration.md @@ -22,6 +22,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsMeetingPolicy.md b/docs/docs/resources/teams/TeamsMeetingPolicy.md index f57fe2d437..ae74df5e1e 100644 --- a/docs/docs/resources/teams/TeamsMeetingPolicy.md +++ b/docs/docs/resources/teams/TeamsMeetingPolicy.md @@ -72,6 +72,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsMessagingPolicy.md b/docs/docs/resources/teams/TeamsMessagingPolicy.md index 69389222c9..34b002a9a9 100644 --- a/docs/docs/resources/teams/TeamsMessagingPolicy.md +++ b/docs/docs/resources/teams/TeamsMessagingPolicy.md @@ -35,6 +35,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsMobilityPolicy.md b/docs/docs/resources/teams/TeamsMobilityPolicy.md index cf1b238da7..885d5d5180 100644 --- a/docs/docs/resources/teams/TeamsMobilityPolicy.md +++ b/docs/docs/resources/teams/TeamsMobilityPolicy.md @@ -14,6 +14,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsNetworkRoamingPolicy.md b/docs/docs/resources/teams/TeamsNetworkRoamingPolicy.md index 7bd09020d3..459a8c1e19 100644 --- a/docs/docs/resources/teams/TeamsNetworkRoamingPolicy.md +++ b/docs/docs/resources/teams/TeamsNetworkRoamingPolicy.md @@ -13,6 +13,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsOnlineVoiceUser.md b/docs/docs/resources/teams/TeamsOnlineVoiceUser.md index 885a3bcd2b..1ffbdd96a4 100644 --- a/docs/docs/resources/teams/TeamsOnlineVoiceUser.md +++ b/docs/docs/resources/teams/TeamsOnlineVoiceUser.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsOnlineVoicemailPolicy.md b/docs/docs/resources/teams/TeamsOnlineVoicemailPolicy.md index 9d5dcb4d6b..d66f177c39 100644 --- a/docs/docs/resources/teams/TeamsOnlineVoicemailPolicy.md +++ b/docs/docs/resources/teams/TeamsOnlineVoicemailPolicy.md @@ -18,6 +18,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | # TeamsOnlinceVoicemailPolicy diff --git a/docs/docs/resources/teams/TeamsOnlineVoicemailUserSettings.md b/docs/docs/resources/teams/TeamsOnlineVoicemailUserSettings.md index 4109f0bb3e..b783b80581 100644 --- a/docs/docs/resources/teams/TeamsOnlineVoicemailUserSettings.md +++ b/docs/docs/resources/teams/TeamsOnlineVoicemailUserSettings.md @@ -20,6 +20,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsOrgWideAppSettings.md b/docs/docs/resources/teams/TeamsOrgWideAppSettings.md index 74a36a0688..77ca71aa99 100644 --- a/docs/docs/resources/teams/TeamsOrgWideAppSettings.md +++ b/docs/docs/resources/teams/TeamsOrgWideAppSettings.md @@ -7,6 +7,7 @@ | **IsSingleInstance** | Key | String | Specifies the resource is a single instance, the value must be 'Yes' | `Yes` | | **IsSideloadedAppsInteractionEnabled** | Write | Boolean | Determines whether or not to allow interaction with custom apps. | | | **Credential** | Write | PSCredential | Credentials of the Teams Admin | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | # TeamsOgWideAppSettings diff --git a/docs/docs/resources/teams/TeamsPstnUsage.md b/docs/docs/resources/teams/TeamsPstnUsage.md index 2393755e3c..2249dddfb7 100644 --- a/docs/docs/resources/teams/TeamsPstnUsage.md +++ b/docs/docs/resources/teams/TeamsPstnUsage.md @@ -10,6 +10,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsShiftsPolicy.md b/docs/docs/resources/teams/TeamsShiftsPolicy.md index d7dc1079f8..e03377d512 100644 --- a/docs/docs/resources/teams/TeamsShiftsPolicy.md +++ b/docs/docs/resources/teams/TeamsShiftsPolicy.md @@ -17,6 +17,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTeam.md b/docs/docs/resources/teams/TeamsTeam.md index 50460212f8..d45236e6ea 100644 --- a/docs/docs/resources/teams/TeamsTeam.md +++ b/docs/docs/resources/teams/TeamsTeam.md @@ -32,6 +32,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTemplatesPolicy.md b/docs/docs/resources/teams/TeamsTemplatesPolicy.md index f1b609f984..ae5e4dc6bd 100644 --- a/docs/docs/resources/teams/TeamsTemplatesPolicy.md +++ b/docs/docs/resources/teams/TeamsTemplatesPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTenantDialPlan.md b/docs/docs/resources/teams/TeamsTenantDialPlan.md index aedc6c19ba..81fa2c6813 100644 --- a/docs/docs/resources/teams/TeamsTenantDialPlan.md +++ b/docs/docs/resources/teams/TeamsTenantDialPlan.md @@ -15,6 +15,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ### MSFT_TeamsVoiceNormalizationRule diff --git a/docs/docs/resources/teams/TeamsTenantNetworkRegion.md b/docs/docs/resources/teams/TeamsTenantNetworkRegion.md index a3f7317a76..4800c0f10c 100644 --- a/docs/docs/resources/teams/TeamsTenantNetworkRegion.md +++ b/docs/docs/resources/teams/TeamsTenantNetworkRegion.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTenantNetworkSite.md b/docs/docs/resources/teams/TeamsTenantNetworkSite.md index 276cebed6b..40ce3739c5 100644 --- a/docs/docs/resources/teams/TeamsTenantNetworkSite.md +++ b/docs/docs/resources/teams/TeamsTenantNetworkSite.md @@ -18,6 +18,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTenantNetworkSubnet.md b/docs/docs/resources/teams/TeamsTenantNetworkSubnet.md index 06c5ecf19a..a4455fe902 100644 --- a/docs/docs/resources/teams/TeamsTenantNetworkSubnet.md +++ b/docs/docs/resources/teams/TeamsTenantNetworkSubnet.md @@ -13,6 +13,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTenantTrustedIPAddress.md b/docs/docs/resources/teams/TeamsTenantTrustedIPAddress.md index 49ffa4a573..627539400b 100644 --- a/docs/docs/resources/teams/TeamsTenantTrustedIPAddress.md +++ b/docs/docs/resources/teams/TeamsTenantTrustedIPAddress.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsTranslationRule.md b/docs/docs/resources/teams/TeamsTranslationRule.md index 5bf465ca20..723c968fa6 100644 --- a/docs/docs/resources/teams/TeamsTranslationRule.md +++ b/docs/docs/resources/teams/TeamsTranslationRule.md @@ -13,6 +13,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUnassignedNumberTreatment.md b/docs/docs/resources/teams/TeamsUnassignedNumberTreatment.md index bc15a85cfe..6c111e8968 100644 --- a/docs/docs/resources/teams/TeamsUnassignedNumberTreatment.md +++ b/docs/docs/resources/teams/TeamsUnassignedNumberTreatment.md @@ -15,6 +15,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUpdateManagementPolicy.md b/docs/docs/resources/teams/TeamsUpdateManagementPolicy.md index 1469929ee9..7451fa8b04 100644 --- a/docs/docs/resources/teams/TeamsUpdateManagementPolicy.md +++ b/docs/docs/resources/teams/TeamsUpdateManagementPolicy.md @@ -18,6 +18,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUpgradeConfiguration.md b/docs/docs/resources/teams/TeamsUpgradeConfiguration.md index 2a7f55b508..e1c9634998 100644 --- a/docs/docs/resources/teams/TeamsUpgradeConfiguration.md +++ b/docs/docs/resources/teams/TeamsUpgradeConfiguration.md @@ -11,6 +11,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUpgradePolicy.md b/docs/docs/resources/teams/TeamsUpgradePolicy.md index 2066af5abd..0e6b95be61 100644 --- a/docs/docs/resources/teams/TeamsUpgradePolicy.md +++ b/docs/docs/resources/teams/TeamsUpgradePolicy.md @@ -11,6 +11,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUser.md b/docs/docs/resources/teams/TeamsUser.md index 895db84834..b8bd4bfd5c 100644 --- a/docs/docs/resources/teams/TeamsUser.md +++ b/docs/docs/resources/teams/TeamsUser.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUserCallingSettings.md b/docs/docs/resources/teams/TeamsUserCallingSettings.md index 21ad05c299..369c7b6078 100644 --- a/docs/docs/resources/teams/TeamsUserCallingSettings.md +++ b/docs/docs/resources/teams/TeamsUserCallingSettings.md @@ -18,6 +18,7 @@ | **ForwardingTarget** | Write | String | The forwarding target. Supported types of values are ObjectId's, SIP addresses and phone numbers. For phone numbers we support the following types of formats: E.164 (+12065551234 or +1206555000;ext=1234) or non-E.164 like 1234. | | | **Ensure** | Write | String | Present ensures the policy exists, absent ensures it is removed. | `Present`, `Absent` | | **Credential** | Required | PSCredential | Credentials of the Teams Global Admin. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsUserPolicyAssignment.md b/docs/docs/resources/teams/TeamsUserPolicyAssignment.md index d7ec987d99..46de0d3eb6 100644 --- a/docs/docs/resources/teams/TeamsUserPolicyAssignment.md +++ b/docs/docs/resources/teams/TeamsUserPolicyAssignment.md @@ -31,6 +31,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | # TeamsUserAssignmentPolicy diff --git a/docs/docs/resources/teams/TeamsVdiPolicy.md b/docs/docs/resources/teams/TeamsVdiPolicy.md index 5bf7a9b8d3..0cf0a7655d 100644 --- a/docs/docs/resources/teams/TeamsVdiPolicy.md +++ b/docs/docs/resources/teams/TeamsVdiPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsVoiceRoute.md b/docs/docs/resources/teams/TeamsVoiceRoute.md index 5da9a6af95..f194d9db01 100644 --- a/docs/docs/resources/teams/TeamsVoiceRoute.md +++ b/docs/docs/resources/teams/TeamsVoiceRoute.md @@ -15,6 +15,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsVoiceRoutingPolicy.md b/docs/docs/resources/teams/TeamsVoiceRoutingPolicy.md index 0194070790..96252959c4 100644 --- a/docs/docs/resources/teams/TeamsVoiceRoutingPolicy.md +++ b/docs/docs/resources/teams/TeamsVoiceRoutingPolicy.md @@ -12,6 +12,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/resources/teams/TeamsWorkloadPolicy.md b/docs/docs/resources/teams/TeamsWorkloadPolicy.md index 4b7588a542..bfa304ab20 100644 --- a/docs/docs/resources/teams/TeamsWorkloadPolicy.md +++ b/docs/docs/resources/teams/TeamsWorkloadPolicy.md @@ -17,6 +17,7 @@ | **ApplicationId** | Write | String | Id of the Azure Active Directory application to authenticate with. | | | **TenantId** | Write | String | Id of the Azure Active Directory tenant used for authentication. | | | **CertificateThumbprint** | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | | +| **ManagedIdentity** | Write | Boolean | Managed ID being used for authentication. | | ## Description diff --git a/docs/docs/user-guide/get-started/authentication-and-permissions.md b/docs/docs/user-guide/get-started/authentication-and-permissions.md index fed5f1ce6c..e61a750122 100644 --- a/docs/docs/user-guide/get-started/authentication-and-permissions.md +++ b/docs/docs/user-guide/get-started/authentication-and-permissions.md @@ -31,7 +31,7 @@ The following table provides an overview of what authentication methods are supp | *Planner** | Microsoft.Graph.Authentication
(Connect-MgGraph) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Cross](../../Images/cross.png) | ![Check](../../Images/check.png) | ![Cross](../../Images/check.png) | | *Security & Compliance Center* | ExchangeOnlineManagement
(Connect-IPPSSession) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Cross](../../Images/cross.png) | ![Cross](../../Images/cross.png) | | *SharePoint Online* | PnP.PowerShell
(Connect-PnPOnline) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Cross](../../Images/check.png) | -| *Teams* | MicrosoftTeams
(Connect-MicrosoftTeams) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Cross](../../Images/cross.png) | ![Cross](../../Images/cross.png) | ![Cross](../../Images/cross.png) | +| *Teams* | MicrosoftTeams
(Connect-MicrosoftTeams) | ![Check](../../Images/check.png) | ![Check](../../Images/check.png) | ![Cross](../../Images/cross.png) | ![Cross](../../Images/cross.png) | ![Check](../../Images/check.png) | > ![Check](../../Images/check.png) = Supported / ![Cross](../../Images/cross.png) = Not supported