Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/windows 10 baseline #5448

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Fixing issue with the way the QrCodeImage property was exported and handled.
* IntuneFirewallPolicyWindows10
* Fix export of properties that appear multiple times in subsections.
* IntuneSecurityBaselineWindows10
* Initial release.
* M365DSCDRGUtil
* Improve settings catalog handling for nested objects.
* M365DSCResourceGenerator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
{
"resourceName": "IntuneSecurityBaselineDefenderForEndpoint",
"description": "This resource configures an Test Intune Security Baseline Defender For Endpoint.",
"permissions": {
"graph": {
"delegated": {
"read": [
{
"name": "DeviceManagementConfiguration.Read.All"
"resourceName":"IntuneSecurityBaselineDefenderForEndpoint",
"description":"This resource configures an Test Intune Security Baseline Defender For Endpoint.",
"permissions":{
"graph":{
"delegated":{
"read":[
{
"name":"Group.Read.All"
},
{
"name":"DeviceManagementConfiguration.Read.All"
}
],
"update": [
"update":[
{
"name":"Group.Read.All"
},
{
"name": "DeviceManagementConfiguration.ReadWrite.All"
"name":"DeviceManagementConfiguration.ReadWrite.All"
}
]
},
"application": {
"read": [
"application":{
"read":[
{
"name": "DeviceManagementConfiguration.Read.All"
"name":"Group.Read.All"
},
{
"name":"DeviceManagementConfiguration.Read.All"
}
],
"update": [
"update":[
{
"name":"Group.Read.All"
},
{
"name": "DeviceManagementConfiguration.ReadWrite.All"
"name":"DeviceManagementConfiguration.ReadWrite.All"
}
]
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# IntuneSecurityBaselineWindows10

## Description

Intune Security Baseline for Windows10
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"resourceName":"IntuneSecurityBaselineWindows10",
"description":"This resource configures an Intune Security Baseline for Windows10.",
"permissions":{
"graph":{
"delegated":{
"read":[
{
"name":"DeviceManagementConfiguration.Read.All"
},
{
"name":"Group.Read.All"
}
],
"update":[
{
"name":"Group.Read.All"
},
{
"name":"DeviceManagementConfiguration.ReadWrite.All"
}
]
},
"application":{
"read":[
{
"name":"DeviceManagementConfiguration.Read.All"
},
{
"name":"Group.Read.All"
}
],
"update":[
{
"name":"Group.Read.All"
},
{
"name":"DeviceManagementConfiguration.ReadWrite.All"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<#
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()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
IntuneSecurityBaselineWindows10 'mySecurityBaselineWindows10'
{
DisplayName = 'test'
DeviceSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogDeviceSettings_IntuneSecurityBaselineWindows10
{
Pol_MSS_DisableIPSourceRoutingIPv6 = '1'
DisableIPSourceRoutingIPv6 = '0'
BlockExecutionOfPotentiallyObfuscatedScripts = 'block'
HardenedUNCPaths_Pol_HardenedPaths = '1'
pol_hardenedPaths = @(
MSFT_MicrosoftGraphIntuneSettingsCatalogpol_hardenedpaths{
Key = '\\*\SYSVOL'
Value = 'RequireMutualAuthentication=1,RequireIntegrity=1'
}
)
}
UserSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogUserSettings_IntuneSecurityBaselineWindows10
{
AllowWindowsSpotlight = '1'
}
Ensure = 'Present'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<#
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()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
IntuneSecurityBaselineWindows10 'mySecurityBaselineWindows10'
{
DisplayName = 'test'
DeviceSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogDeviceSettings_IntuneSecurityBaselineWindows10
{
Pol_MSS_DisableIPSourceRoutingIPv6 = '1'
DisableIPSourceRoutingIPv6 = '0'
BlockExecutionOfPotentiallyObfuscatedScripts = 'block'
HardenedUNCPaths_Pol_HardenedPaths = '1'
pol_hardenedPaths = @(
MSFT_MicrosoftGraphIntuneSettingsCatalogpol_hardenedpaths{
Key = '\\*\SYSVOL'
Value = 'RequireMutualAuthentication=1,RequireIntegrity=1'
}
)
}
UserSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogUserSettings_IntuneSecurityBaselineWindows10
{
AllowWindowsSpotlight = '1' #drift
}
Ensure = 'Present'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<#
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()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
IntuneSecurityBaselineWindows10 'mySecurityBaselineWindows10'
{
DisplayName = 'test'
Ensure = 'Absent'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}
4 changes: 4 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,10 @@ function Get-IntuneSettingCatalogPolicySettingInstanceValue
{
$childSettingValue.Add('settingInstanceTemplateReference', @{'settingInstanceTemplateId' = $childSettingInstanceTemplate.settingInstanceTemplateId })
}
if ($childSettingType -eq '#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionInstance')
{
$childSettingType = '#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance'
}
$childSettingValue.Add('@odata.type', $childSettingType)
$choiceSettingValueChildren += $childSettingValue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
'microsoft_edge~Policy~microsoft_edge~*' { $settingName = $settingName.Replace('microsoft_edge~Policy~microsoft_edge', 'MicrosoftEdge_') }
'edge~httpauthentication*' { $settingName = $settingName.Replace('edge~httpauthentication', 'MicrosoftEdge_HTTPAuthentication') }
'edge~contentsettings*' { $settingName = $settingName.Replace('edge~contentsettings', 'MicrosoftEdge_ContentSettings') }
'*~SmartScreen_*' { $settingName = $settingName.Replace('~SmartScreen', 'SmartScreen') }
'*~L_Security~*' { $settingName = $settingName.Replace('~L_Security', 'Security') }
'*~L_TrustCenter*' { $settingName = $settingName.Replace('~L_TrustCenter', '_TrustCenter') }
'*~L_ProtectedView_*' { $settingName = $settingName.Replace('~L_ProtectedView', 'ProtectedView') }
Expand Down
Loading