Skip to content

Commit

Permalink
Add examples new account protection policy
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienTschanz committed Oct 8, 2024
1 parent 716fc9f commit f58b0bc
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<#
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
{
IntuneAccountProtectionPolicyWindows10 'myAccountProtectionPolicy'
{
DisplayName = 'test'
DeviceSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogDeviceSettings
{
History = 10
EnablePinRecovery = 'true'
}
UserSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogUserSettings
{
History = 20
EnablePinRecovery = 'true'
}
Ensure = 'Present'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<#
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
{
IntuneAccountProtectionPolicyWindows10 'myAccountProtectionPolicy'
{
DisplayName = 'test'
DeviceSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogDeviceSettings
{
History = 10
EnablePinRecovery = 'true'
}
UserSettings = MSFT_MicrosoftGraphIntuneSettingsCatalogUserSettings
{
History = 30 # Updated property
EnablePinRecovery = 'true'
}
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
{
IntuneAccountProtectionPolicyWindows10 'myAccountProtectionPolicy'
{
DisplayName = 'test'
Ensure = 'Absent'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}

0 comments on commit f58b0bc

Please sign in to comment.