Skip to content

Commit

Permalink
Added 7 missing parameters to IntuneAppProtectionPolicyiOS.psm1 and u…
Browse files Browse the repository at this point in the history
…pdated unit tests file accordingly
  • Loading branch information
Jamie authored and Jamie committed Mar 4, 2022
1 parent 97c2172 commit 44652c5
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,34 @@ function Get-TargetResource
[System.Boolean]
$DeviceComplianceRequired,

[Parameter()]
[System.Boolean]
$IsAssigned,

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

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

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

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

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

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

[Parameter()]
[System.Boolean]
$ManagedBrowserToOpenLinksRequired,
Expand Down Expand Up @@ -215,6 +243,13 @@ function Get-TargetResource
AllowedOutboundClipboardSharingLevel = $policy.AllowedOutboundClipboardSharingLevel
DataBackupBlocked = $policy.DataBackupBlocked
DeviceComplianceRequired = $policy.DeviceComplianceRequired
IsAssigned = $policy.IsAssigned
ManagedBrowser = $policy.ManagedBrowser
MinimumRequiredAppVersion = $policy.MinimumRequiredAppVersion
MinimumRequiredOSVersion = $policy.MinimumRequiredOSVersion
MinimumRequiredSdkVersion = $policy.MinimumRequiredSDKVersion
MinimumWarningAppVersion = $policy.MinimumWarningAppVersion
MinimumWarningOSVersion = $policy.MinimumWarningOSVersion
ManagedBrowserToOpenLinksRequired = $policy.ManagedBrowserToOpenLinksRequired
SaveAsBlocked = $policy.SaveAsBlocked
PeriodOfflineBeforeWipeIsEnforced = $policy.PeriodOfflineBeforeWipeIsEnforced
Expand Down Expand Up @@ -304,6 +339,34 @@ function Set-TargetResource
[System.Boolean]
$DeviceComplianceRequired,

[Parameter()]
[System.Boolean]
$IsAssigned,

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

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

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

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

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

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

[Parameter()]
[System.Boolean]
$ManagedBrowserToOpenLinksRequired,
Expand Down Expand Up @@ -506,6 +569,34 @@ function Test-TargetResource
[System.Boolean]
$DeviceComplianceRequired,

[Parameter()]
[System.Boolean]
$IsAssigned,

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

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

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

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

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

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

[Parameter()]
[System.Boolean]
$ManagedBrowserToOpenLinksRequired,
Expand Down Expand Up @@ -838,6 +929,13 @@ function Get-M365DSCIntuneAppProtectionPolicyiOSJSON
"allowedOutboundClipboardSharingLevel": "$($Parameters.AllowedOutboundClipboardSharingLevel)",
"dataBackupBlocked": $($Parameters.DataBackupBlocked.ToString().ToLower()),
"deviceComplianceRequired": $($Parameters.DeviceComplianceRequired.ToString().ToLower()),
"IsAssigned": $($Parameters.IsAssigned.ToString().ToLower()),
"ManagedBrowser": $($Parameters.ManagedBrowser),
"MinimumRequiredAppVersion": $($Parameters.MinimumWarningAppVersion),
"MinimumRequiredOSVersion": $($Parameters.MinimumRequiredOSVersion),
"MinimumRequiredSdkVersion": $($Parameters.MinimumRequiredSdkVersion),
"MinimumWarningAppVersion": $($Parameters.MinimumWarningAppVersion),
"MinimumWarningOSVersion": $($Parameters.MinimumWarningOSVersion),
"managedBrowserToOpenLinksRequired": $($Parameters.ManagedBrowserToOpenLinksRequired.ToString().ToLower()),
"saveAsBlocked": $($Parameters.SaveAsBlocked.ToString().ToLower()),
"periodOfflineBeforeWipeIsEnforced": "$($Parameters.PeriodOfflineBeforeWipeIsEnforced)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,16 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
DisplayName = "DSC Policy";
Ensure = "Present"
ExcludedGroups = @("3eacc231-d77b-4efb-bb5f-310f68bd6198");
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
Credential = $Credential;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down Expand Up @@ -140,9 +147,16 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
DisplayName = "DSC Policy";
Ensure = "Present"
ExcludedGroups = @("3eacc231-d77b-4efb-bb5f-310f68bd6198");
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
Credential = $Credential;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $False; #Drift
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down Expand Up @@ -216,8 +230,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = "";
DeviceComplianceRequired = $True;
DisplayName = "DSC Policy";
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down Expand Up @@ -267,8 +288,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
DisplayName = "DSC Policy";
Ensure = "Present"
ExcludedGroups = @("3eacc231-d77b-4efb-bb5f-310f68bd6198");
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
Credential = $Credential;
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
Expand Down Expand Up @@ -343,8 +371,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = "";
DeviceComplianceRequired = $True;
DisplayName = "DSC Policy";
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down Expand Up @@ -385,9 +420,16 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
DisplayName = "DSC Policy";
Ensure = "Absent"
ExcludedGroups = @("3eacc231-d77b-4efb-bb5f-310f68bd6198");
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
Credential = $Credential;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down Expand Up @@ -461,8 +503,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = "";
DeviceComplianceRequired = $True;
DisplayName = "DSC Policy";
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down Expand Up @@ -559,8 +608,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = "";
DeviceComplianceRequired = $True;
DisplayName = "DSC Policy";
FaceIdBlocked = $False
FaceIdBlocked = $False;
FingerprintBlocked = $False;
IsAssigned = $False;
ManagedBrowser = "microsoftEdge";
MinimumRequiredAppVersion = "0.2";
MinimumRequiredOSVersion = "0.2";
MinimumRequiredSdkVersion = "0.1";
MinimumWarningAppVersion = "0.1";
MinimumWarningOSVersion = "0.1";
ManagedBrowserToOpenLinksRequired = $True;
MaximumPinRetries = 5;
MinimumPinLength = 4;
Expand Down

0 comments on commit 44652c5

Please sign in to comment.