forked from microsoft/Microsoft365DSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add examples new account protection policy
- Loading branch information
1 parent
716fc9f
commit f58b0bc
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
...es/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionPolicyWindows10/1-Create.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...es/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionPolicyWindows10/2-Update.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...es/Microsoft365DSC/Examples/Resources/IntuneAccountProtectionPolicyWindows10/3-Remove.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |