DscResources/SecurityCompliance/SecurityCompliance.schema.psm1
# (2024-12-05 01:44:00) Generated using Microsoft365DSC v1.24.1204.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') } $parameters.DependsOn = $ConfigurationData.NonNodeData.SecurityCompliance.SensitivityLabels.Name | ForEach-Object { "[SCSensitivityLabel]SCSensitivityLabel-{0}" -f $_ } (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 ($DeviceConditionalAccessRule in $ConfigurationData.NonNodeData.SecurityCompliance.DeviceConditionalAccessRules) { $resourceTitle = 'SCDeviceConditionalAccessRule-{0}' -f $DeviceConditionalAccessRule.Name $parameters = $DeviceConditionalAccessRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCDeviceConditionalAccessRule' -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 ($DeviceConfigurationRule in $ConfigurationData.NonNodeData.SecurityCompliance.DeviceConfigurationRules) { $resourceTitle = 'SCDeviceConfigurationRule-{0}' -f $DeviceConfigurationRule.Name $parameters = $DeviceConfigurationRule $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCDeviceConfigurationRule' -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 ($InsiderRiskEntityList in $ConfigurationData.NonNodeData.SecurityCompliance.InsiderRiskEntityLists) { $resourceTitle = 'SCInsiderRiskEntityList-{0}' -f $InsiderRiskEntityList.Name $parameters = $InsiderRiskEntityList $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('Domains')) { $parameters.Domains = $parameters.Domains | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCInsiderRiskEntityListDomain' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('Sites')) { $parameters.Sites = $parameters.Sites | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCInsiderRiskEntityListSite' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'SCInsiderRiskEntityList' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($InsiderRiskPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.InsiderRiskPolicies) { $resourceTitle = 'SCInsiderRiskPolicy-{0}-{1}' -f $InsiderRiskPolicy.Name,$InsiderRiskPolicy.InsiderRiskScenario $parameters = $InsiderRiskPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCInsiderRiskPolicy' -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) } if ($ConfigurationData.NonNodeData.SecurityCompliance.ContainsKey('PolicyConfig')) { $resourceTitle = 'PolicyConfigDefaults' $parameters = $ConfigurationData.NonNodeData.SecurityCompliance.PolicyConfig $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } if ($parameters.ContainsKey('BusinessJustificationList')) { $parameters.BusinessJustificationList = $parameters.BusinessJustificationList | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigBusinessJustificationList' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('DLPAppGroups')) { $parameters.DLPAppGroups = $parameters.DLPAppGroups | ForEach-Object { if ($_.ContainsKey('Apps')) { $_.Apps = $_.Apps | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigDLPApp' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigDLPAppGroups' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('DLPNetworkShareGroups')) { $parameters.DLPNetworkShareGroups = $parameters.DLPNetworkShareGroups | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigDLPNetworkShareGroups' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('DLPPrinterGroups')) { $parameters.DLPPrinterGroups = $parameters.DLPPrinterGroups | ForEach-Object { if ($_.ContainsKey('printers')) { $_.printers = $_.printers | ForEach-Object { if ($_.ContainsKey('ipRange')) { $_.ipRange = $_.ipRange | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigIPRange' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigPrinter' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigDLPPrinterGroups' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('DLPRemovableMediaGroups')) { $parameters.DLPRemovableMediaGroups = $parameters.DLPRemovableMediaGroups | ForEach-Object { if ($_.ContainsKey('removableMedia')) { $_.removableMedia = $_.removableMedia | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigRemovableMedia' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigDLPRemovableMediaGroups' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('EvidenceStoreSettings')) { $parameters.EvidenceStoreSettings = $parameters.EvidenceStoreSettings | ForEach-Object { if ($_.ContainsKey('StorageAccounts')) { $_.StorageAccounts = $_.StorageAccounts | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigStorageAccount' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigEvidenceStoreSettings' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('SiteGroups')) { $parameters.SiteGroups = $parameters.SiteGroups | ForEach-Object { if ($_.ContainsKey('addresses')) { $_.addresses = $_.addresses | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigSiteGroupAddress' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigDLPSiteGroups' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('UnallowedApp')) { $parameters.UnallowedApp = $parameters.UnallowedApp | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigApp' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('UnallowedCloudSyncApp')) { $parameters.UnallowedCloudSyncApp = $parameters.UnallowedCloudSyncApp | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigApp' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('UnallowedBluetoothApp')) { $parameters.UnallowedBluetoothApp = $parameters.UnallowedBluetoothApp | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigApp' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('UnallowedBrowser')) { $parameters.UnallowedBrowser = $parameters.UnallowedBrowser | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigApp' -Properties $_ -NoInvoke).Invoke($_) } } if ($parameters.ContainsKey('QuarantineParameters')) { $parameters.QuarantineParameters = $parameters.QuarantineParameters | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_PolicyConfigQuarantineParameters' -Properties $_ -NoInvoke).Invoke($_) } } (Get-DscSplattedResource -ResourceName 'SCPolicyConfig' -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) } if ($ConfigurationData.NonNodeData.SecurityCompliance.ContainsKey('RecordReviewNotificationTemplateConfig')) { $resourceTitle = 'RecordReviewNotificationTemplateConfigDefaults' $parameters = $ConfigurationData.NonNodeData.SecurityCompliance.RecordReviewNotificationTemplateConfig $parameters.IsSingleInstance = 'Yes' $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCRecordReviewNotificationTemplateConfig' -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 ($RoleGroup in $ConfigurationData.NonNodeData.SecurityCompliance.RoleGroups) { $resourceTitle = 'SCRoleGroup-{0}' -f $RoleGroup.Name $parameters = $RoleGroup $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCRoleGroup' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } foreach ($RoleGroupMember in $ConfigurationData.NonNodeData.SecurityCompliance.RoleGroupMembers) { $resourceTitle = 'SCRoleGroupMember-{0}' -f $RoleGroupMember.Name $parameters = $RoleGroupMember $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCRoleGroupMember' -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($_) } } if ($parameters.ContainsKey('AutoLabelingSettings')) { $parameters.AutoLabelingSettings = $parameters.AutoLabelingSettings | ForEach-Object { if ($_.ContainsKey('Groups')) { $_.Groups = $_.Groups | ForEach-Object { if ($_.ContainsKey('SensitiveInformationType')) { $_.SensitiveInformationType = $_.SensitiveInformationType | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCSLSensitiveInformationType' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('TrainableClassifier')) { $_.TrainableClassifier = $_.TrainableClassifier | ForEach-Object { if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCSLTrainableClassifiers' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCSLSensitiveInformationGroup' -Properties $_ -NoInvoke).Invoke($_) } } if ($_.ContainsKey('UniqueId')) { $_.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'MSFT_SCSLAutoLabelingSettings' -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) } foreach ($UnifiedAuditLogRetentionPolicy in $ConfigurationData.NonNodeData.SecurityCompliance.UnifiedAuditLogRetentionPolicies) { $resourceTitle = 'SCUnifiedAuditLogRetentionPolicy-{0}' -f $UnifiedAuditLogRetentionPolicy.Name $parameters = $UnifiedAuditLogRetentionPolicy $parameters.ApplicationId = $ApplicationId $parameters.TenantId = $TenantId $parameters.CertificateThumbprint = $CertificateThumbprint if ($parameters.ContainsKey('UniqueId')) { $parameters.Remove('UniqueId') } (Get-DscSplattedResource -ResourceName 'SCUnifiedAuditLogRetentionPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters) } } |