DscResources/SecurityCompliance/SecurityCompliance.schema.psm1
# (2024-02-23 01:05:25) Generated using Microsoft365DSC v1.24.221.1 Configuration 'SecurityCompliance' { param ( [Parameter(Mandatory = $true)] [System.String] $ApplicationId, [Parameter(Mandatory = $true)] [System.String] $TenantId, [Parameter(Mandatory = $true)] [System.String] $CertificateThumbprint ) Import-DscResource -ModuleName Microsoft365DSC foreach ($AuditConfigurationPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.AuditConfigurationPolicies) { $resourceTitle = 'SCAuditConfigurationPolicy-{0}' -f $AuditConfigurationPolicy.Workload $parameters = $AuditConfigurationPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCAuditConfigurationPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AutoSensitivityLabelPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.AutoSensitivityLabelPolicies) { $resourceTitle = 'SCAutoSensitivityLabelPolicy-{0}' -f $AutoSensitivityLabelPolicy.Name $parameters = $AutoSensitivityLabelPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCAutoSensitivityLabelPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($AutoSensitivityLabelRule in $ConfigurationData.NonNodeData.SecurityCompliance.AutoSensitivityLabelRules) { $resourceTitle = 'SCAutoSensitivityLabelRule-{0}-{1}' -f $AutoSensitivityLabelRule.Name,$AutoSensitivityLabelRule.Workload $parameters = $AutoSensitivityLabelRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ContentContainsSensitiveInformation')) { $parameters.ContentContainsSensitiveInformation = $parameters.ContentContainsSensitiveInformation | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Groups')) { $_.Groups = $_.Groups | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Labels')) { $_.Labels = $_.Labels | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPLabel' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformationGroup' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('ExceptIfContentContainsSensitiveInformation')) { $parameters.ExceptIfContentContainsSensitiveInformation = $parameters.ExceptIfContentContainsSensitiveInformation | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Groups')) { $_.Groups = $_.Groups | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Labels')) { $_.Labels = $_.Labels | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPLabel' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformationGroup' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('HeaderMatchesPatterns')) { $parameters.HeaderMatchesPatterns = $parameters.HeaderMatchesPatterns | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCHeaderPattern' -Properties $_ -NoInvoke).Invoke($_) } } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.AutoSensitivityLabelPolicies.Name | ForEach-Object { "[SCAutoSensitivityLabelPolicy]SCAutoSensitivityLabelPolicy-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCAutoSensitivityLabelRule' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($CaseHoldPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.CaseHoldPolicies) { $resourceTitle = 'SCCaseHoldPolicy-{0}-{1}' -f $CaseHoldPolicy.Name,$CaseHoldPolicy.Case $parameters = $CaseHoldPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.ComplianceCases.Name | ForEach-Object { "[SCComplianceCase]SCComplianceCase-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCCaseHoldPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($CaseHoldRule in $ConfigurationData.NonNodeData.SecurityCompliance.CaseHoldRules) { $resourceTitle = 'SCCaseHoldRule-{0}-{1}' -f $CaseHoldRule.Name,$CaseHoldRule.Policy $parameters = $CaseHoldRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.CaseHoldPolicies | ForEach-Object { "[SCCaseHoldPolicy]SCCaseHoldPolicy-{0}-{1}" -f $_.Name,$_.Case } (Get-DscSplattedResource -ResourceName 'SCCaseHoldRule' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ComplianceCase in $ConfigurationData.NonNodeData.SecurityCompliance.ComplianceCases) { $resourceTitle = 'SCComplianceCase-{0}' -f $ComplianceCase.Name $parameters = $ComplianceCase $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCComplianceCase' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ComplianceSearch in $ConfigurationData.NonNodeData.SecurityCompliance.ComplianceSearchs) { $resourceTitle = 'SCComplianceSearch-{0}' -f $ComplianceSearch.Name $parameters = $ComplianceSearch $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCComplianceSearch' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ComplianceSearchAction in $ConfigurationData.NonNodeData.SecurityCompliance.ComplianceSearchActions) { $resourceTitle = 'SCComplianceSearchAction-{0}-{1}' -f $ComplianceSearchAction.Action,$ComplianceSearchAction.SearchName $parameters = $ComplianceSearchAction $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCComplianceSearchAction' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ComplianceTag in $ConfigurationData.NonNodeData.SecurityCompliance.ComplianceTags) { $resourceTitle = 'SCComplianceTag-{0}' -f $ComplianceTag.Name $parameters = $ComplianceTag $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('FilePlanProperty')) { $parameters.FilePlanProperty = $parameters.FilePlanProperty | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCFilePlanProperty' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'SCComplianceTag' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($DeviceConditionalAccessPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.DeviceConditionalAccessPolicies) { $resourceTitle = 'SCDeviceConditionalAccessPolicy-{0}' -f $DeviceConditionalAccessPolicy.Name $parameters = $DeviceConditionalAccessPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCDeviceConditionalAccessPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($DeviceConfigurationPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.DeviceConfigurationPolicies) { $resourceTitle = 'SCDeviceConfigurationPolicy-{0}' -f $DeviceConfigurationPolicy.Name $parameters = $DeviceConfigurationPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCDeviceConfigurationPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($DLPCompliancePolicy in $ConfigurationData.NonNodeData.SecurityCompliance.DLPCompliancePolicies) { $resourceTitle = 'SCDLPCompliancePolicy-{0}' -f $DLPCompliancePolicy.Name $parameters = $DLPCompliancePolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCDLPCompliancePolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($DLPComplianceRule in $ConfigurationData.NonNodeData.SecurityCompliance.DLPComplianceRules) { $resourceTitle = 'SCDLPComplianceRule-{0}' -f $DLPComplianceRule.Name $parameters = $DLPComplianceRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('ContentContainsSensitiveInformation')) { $parameters.ContentContainsSensitiveInformation = $parameters.ContentContainsSensitiveInformation | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Groups')) { $_.Groups = $_.Groups | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Labels')) { $_.Labels = $_.Labels | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPLabel' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformationGroup' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('ExceptIfContentContainsSensitiveInformation')) { $parameters.ExceptIfContentContainsSensitiveInformation = $parameters.ExceptIfContentContainsSensitiveInformation | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Groups')) { $_.Groups = $_.Groups | ForEach-Object { if ($_.ContainsKey('SensitiveInformation')) { $_.SensitiveInformation = $_.SensitiveInformation | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('Labels')) { $_.Labels = $_.Labels | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPLabel' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformationGroup' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCDLPContainsSensitiveInformation' -Properties $_ -NoInvoke).Invoke($_) } } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.DLPCompliancePolicies.Name | ForEach-Object { "[SCDLPCompliancePolicy]SCDLPCompliancePolicy-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCDLPComplianceRule' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($FilePlanPropertyAuthority in $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertyAuthorities) { $resourceTitle = 'SCFilePlanPropertyAuthority-{0}' -f $FilePlanPropertyAuthority.Name $parameters = $FilePlanPropertyAuthority $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCFilePlanPropertyAuthority' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($FilePlanPropertyCategory in $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertyCategories) { $resourceTitle = 'SCFilePlanPropertyCategory-{0}' -f $FilePlanPropertyCategory.Name $parameters = $FilePlanPropertyCategory $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCFilePlanPropertyCategory' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($FilePlanPropertyCitation in $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertyCitations) { $resourceTitle = 'SCFilePlanPropertyCitation-{0}' -f $FilePlanPropertyCitation.Name $parameters = $FilePlanPropertyCitation $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCFilePlanPropertyCitation' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($FilePlanPropertyDepartment in $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertyDepartments) { $resourceTitle = 'SCFilePlanPropertyDepartment-{0}' -f $FilePlanPropertyDepartment.Name $parameters = $FilePlanPropertyDepartment $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCFilePlanPropertyDepartment' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($FilePlanPropertyReferenceId in $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertyReferenceIds) { $resourceTitle = 'SCFilePlanPropertyReferenceId-{0}' -f $FilePlanPropertyReferenceId.Name $parameters = $FilePlanPropertyReferenceId $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCFilePlanPropertyReferenceId' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($FilePlanPropertySubCategory in $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertySubCategories) { $resourceTitle = 'SCFilePlanPropertySubCategory-{0}' -f $FilePlanPropertySubCategory.Name $parameters = $FilePlanPropertySubCategory $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.FilePlanPropertyCategories.Name | ForEach-Object { "[SCFilePlanPropertyCategory]SCFilePlanPropertyCategory-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCFilePlanPropertySubCategory' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($LabelPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.LabelPolicies) { $resourceTitle = 'SCLabelPolicy-{0}' -f $LabelPolicy.Name $parameters = $LabelPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AdvancedSettings')) { $parameters.AdvancedSettings = $parameters.AdvancedSettings | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCLabelSetting' -Properties $_ -NoInvoke).Invoke($_) } } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.SensitivityLabels.Name | ForEach-Object { "[SCSensitivityLabel]SCSensitivityLabel-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCLabelPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($ProtectionAlert in $ConfigurationData.NonNodeData.SecurityCompliance.ProtectionAlerts) { $resourceTitle = 'SCProtectionAlert-{0}' -f $ProtectionAlert.Name $parameters = $ProtectionAlert $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCProtectionAlert' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RetentionCompliancePolicy in $ConfigurationData.NonNodeData.SecurityCompliance.RetentionCompliancePolicies) { $resourceTitle = 'SCRetentionCompliancePolicy-{0}' -f $RetentionCompliancePolicy.Name $parameters = $RetentionCompliancePolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCRetentionCompliancePolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RetentionComplianceRule in $ConfigurationData.NonNodeData.SecurityCompliance.RetentionComplianceRules) { $resourceTitle = 'SCRetentionComplianceRule-{0}' -f $RetentionComplianceRule.Name $parameters = $RetentionComplianceRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.RetentionCompliancePolicies.Name | ForEach-Object { "[SCRetentionCompliancePolicy]SCRetentionCompliancePolicy-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCRetentionComplianceRule' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RetentionEventType in $ConfigurationData.NonNodeData.SecurityCompliance.RetentionEventTypes) { $resourceTitle = 'SCRetentionEventType-{0}' -f $RetentionEventType.Name $parameters = $RetentionEventType $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCRetentionEventType' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($SecurityFilter in $ConfigurationData.NonNodeData.SecurityCompliance.SecurityFilters) { $resourceTitle = 'SCSecurityFilter-{0}' -f $SecurityFilter.FilterName $parameters = $SecurityFilter $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCSecurityFilter' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($SensitivityLabel in $ConfigurationData.NonNodeData.SecurityCompliance.SensitivityLabels) { $resourceTitle = 'SCSensitivityLabel-{0}' -f $SensitivityLabel.Name $parameters = $SensitivityLabel $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('AdvancedSettings')) { $parameters.AdvancedSettings = $parameters.AdvancedSettings | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCLabelSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('LocaleSettings')) { $parameters.LocaleSettings = $parameters.LocaleSettings | ForEach-Object { if ($_.ContainsKey('LabelSettings')) { $_.LabelSettings = $_.LabelSettings | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCLabelSetting' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCLabelLocaleSettings' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'SCSensitivityLabel' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($SupervisoryReviewPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.SupervisoryReviewPolicies) { $resourceTitle = 'SCSupervisoryReviewPolicy-{0}' -f $SupervisoryReviewPolicy.Name $parameters = $SupervisoryReviewPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCSupervisoryReviewPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($SupervisoryReviewRule in $ConfigurationData.NonNodeData.SecurityCompliance.SupervisoryReviewRules) { $resourceTitle = 'SCSupervisoryReviewRule-{0}-{1}' -f $SupervisoryReviewRule.Name,$SupervisoryReviewRule.Policy $parameters = $SupervisoryReviewRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.SupervisoryReviewPolicies.Name | ForEach-Object { "[SCSupervisoryReviewPolicy]SCSupervisoryReviewPolicy-{0}" -f $_ } (Get-DscSplattedResource -ResourceName 'SCSupervisoryReviewRule' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } } |