Skip to content

Commit

Permalink
Merge pull request #3681 from NikCharlebois/Dev
Browse files Browse the repository at this point in the history
Fixe #3344
  • Loading branch information
NikCharlebois authored Sep 13, 2023
2 parents 4e85a5e + c2c721d commit 90ac71d
Show file tree
Hide file tree
Showing 98 changed files with 280 additions and 334 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -269,7 +269,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -573,7 +573,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $True)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -377,8 +377,14 @@ function Get-TargetResource

if ($null -eq $policy)
{
Write-Verbose -Message "No Endpoint Protection Policy with Id {$Identity} was found"
return $nullResult
Write-Verbose -Message "No policy with Id {$Identity} was found. Trying to retrieve by name {$DisplayName}."
$policy = Get-MgBetaDeviceManagementConfigurationPolicy -Filter "Name eq '$DisplayName'"

if ($null -eq $policy)
{
Write-Verbose -Message "No policy with name {$DisplayName} was found."
return $nullResult
}
}

#Retrieve policy specific settings
Expand Down Expand Up @@ -479,7 +485,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $True)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -915,7 +921,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $True)]
[Parameter()]
[System.String]
$Identity,

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -137,23 +137,19 @@ function Get-TargetResource
[System.String]
$AppDataEncryptionType,


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


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


[Parameter()]
[ValidateSet('block', 'wipe', 'warn')]
[System.String]
$AppActionIfDeviceComplianceRequired,


[Parameter()]
[ValidateSet('block', 'wipe', 'warn')]
[System.String]
Expand All @@ -163,12 +159,10 @@ function Get-TargetResource
[System.String]
$PinRequiredInsteadOfBiometricTimeout,


[Parameter()]
[System.Uint32]
$AllowedOutboundClipboardSharingExceptionLength,


[Parameter()]
[ValidateSet('allow', 'blockOrganizationalData', 'block')]
[System.String]
Expand All @@ -191,23 +185,19 @@ function Get-TargetResource
[System.String[]]
$AllowedIosDeviceModels,


[Parameter()]
[ValidateSet('block', 'wipe', 'warn')]
[System.String]
$AppActionIfIosDeviceModelNotAllowed,


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


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


[Parameter()]
[System.Boolean]
$ProtectInboundDataFromUnknownSources,
Expand Down Expand Up @@ -288,7 +278,7 @@ function Get-TargetResource

if ($null -eq $policy)
{
Write-Verbose -Message "No iOS App Protection Policy {$DisplayName} was found"
Write-Verbose -Message "No iOS App Protection Policy {$DisplayName} was found."
return $nullResult
}

Expand Down Expand Up @@ -354,7 +344,7 @@ function Get-TargetResource
$myPinRequiredInsteadOfBiometricTimeout = $policy.PinRequiredInsteadOfBiometricTimeout.toString()
}

return [ordered]@{
return @{
Identity = $policy.id
DisplayName = $policy.DisplayName
Description = $policy.Description
Expand Down Expand Up @@ -433,7 +423,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -811,7 +801,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[ClassVersion("1.0.0.0"), FriendlyName("IntuneAppProtectionPolicyiOS")]
class MSFT_IntuneAppProtectionPolicyiOS : OMI_BaseResource
{
[Key, Description("Identity of the iOS App Protection Policy.")] String Identity;
[Required, Description("Display name of the iOS App Protection Policy.")] String DisplayName;
[Key, Description("Display name of the iOS App Protection Policy.")] String DisplayName;
[Write, Description("Identity of the iOS App Protection Policy.")] String Identity;
[Write, Description("Description of the iOS App Protection Policy.")] String Description;
[Write, Description("The period after which access is checked when the device is not connected to the internet.")] String PeriodOfflineBeforeAccessCheck;
[Write, Description("The period after which access is checked when the device is connected to the internet.")] String PeriodOnlineBeforeAccessCheck;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -284,7 +284,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down Expand Up @@ -519,7 +519,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Identity,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class MSFT_DeviceManagementConfigurationPolicyAssignments
[ClassVersion("1.0.0.0"), FriendlyName("IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager")]
class MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager : OMI_BaseResource
{
[Key, Description("Identity of the endpoint protection attack surface protection rules policy for Windows 10.")] String Identity;
[Required, Description("Display name of the endpoint protection attack surface protection rules policy for Windows 10.")] String DisplayName;
[Write, Description("Identity of the endpoint protection attack surface protection rules policy for Windows 10.")] String Identity;
[Key, Description("Display name of the endpoint protection attack surface protection rules policy for Windows 10.")] String DisplayName;
[Write, Description("Description of the endpoint protection attack surface protection rules policy for Windows 10.")] String Description;
[Write, Description("Assignments of the endpoint protection attack surface protection rules policy for Windows 10."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[];
[Write, Description("Exclude files and paths from attack surface reduction rules")] String AttackSurfaceReductionOnlyExclusions[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function Get-TargetResource
[System.String]
$PolicyConfigurationIngestionType,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -284,7 +284,7 @@ function Set-TargetResource
[System.String]
$PolicyConfigurationIngestionType,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -608,7 +608,7 @@ function Test-TargetResource
[System.String]
$PolicyConfigurationIngestionType,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class MSFT_IntuneGroupPolicyDefinitionValuePresentationValueKeyValuePair
class MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10 : OMI_BaseResource
{
[Write, Description("User provided description for the resource object.")] String Description;
[Required, Description("User provided name for the resource object.")] String DisplayName;
[Key, Description("User provided name for the resource object.")] String DisplayName;
[Write, Description("Type of definitions configured for this policy. Possible values are: unknown, custom, builtIn, mixed, unknownFutureValue."), ValueMap{"unknown","custom","builtIn","mixed","unknownFutureValue"}, Values{"unknown","custom","builtIn","mixed","unknownFutureValue"}] String PolicyConfigurationIngestionType;
[Key, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("The list of enabled or disabled group policy definition values for the configuration."), EmbeddedInstance("MSFT_IntuneGroupPolicyDefinitionValue")] String DefinitionValues[];
[Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[];
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Get-TargetResource
[System.Boolean]
$SupportsScopeTags,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -201,7 +201,7 @@ function Set-TargetResource
[System.Boolean]
$SupportsScopeTags,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -377,7 +377,7 @@ function Test-TargetResource
[System.Boolean]
$SupportsScopeTags,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class MSFT_MicrosoftGraphOmaSetting
[ClassVersion("1.0.0.0"), FriendlyName("IntuneDeviceConfigurationCustomPolicyWindows10")]
class MSFT_IntuneDeviceConfigurationCustomPolicyWindows10 : OMI_BaseResource
{
[Key, Description("Admin provided name of the device configuration.")] String DisplayName;
[Write, Description("OMA settings. This collection can contain a maximum of 1000 elements."), EmbeddedInstance("MSFT_MicrosoftGraphomaSetting")] String OmaSettings[];
[Write, Description("Admin provided description of the Device Configuration.")] String Description;
[Required, Description("Admin provided name of the device configuration.")] String DisplayName;
[Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags;
[Key, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[];
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Get-TargetResource
[System.String]
$DisplayName,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -219,7 +219,7 @@ function Set-TargetResource
[System.String]
$DisplayName,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -393,7 +393,7 @@ function Test-TargetResource
[System.String]
$DisplayName,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10
[Write, Description("Windows Defender AdvancedThreatProtection 'Allow Sample Sharing' Rule")] Boolean AllowSampleSharing;
[Write, Description("Expedite Windows Defender Advanced Threat Protection telemetry reporting frequency.")] Boolean EnableExpeditedTelemetryReporting;
[Write, Description("Admin provided description of the Device Configuration.")] String Description;
[Required, Description("Admin provided name of the device configuration.")] String DisplayName;
[Key, Description("The unique identifier for an entity. Read-only.")] String Id;
[Key, Description("Admin provided name of the device configuration.")] String DisplayName;
[Write, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[];
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Get-TargetResource
[System.Boolean]
$SupportsScopeTags,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -408,7 +408,7 @@ function Set-TargetResource
[System.Boolean]
$SupportsScopeTags,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -635,7 +635,7 @@ function Test-TargetResource
[System.Boolean]
$SupportsScopeTags,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10 : OMI_Ba
[Write, Description("Specifies to restrict peer selection via selected option."), ValueMap{"notConfigured","subnetMask"}, Values{"notConfigured","subnetMask"}] String RestrictPeerSelectionBy;
[Write, Description("Specifies whether the device is allowed to participate in Peer Caching while connected via VPN to the domain network."), ValueMap{"notConfigured","enabled","disabled"}, Values{"notConfigured","enabled","disabled"}] String VpnPeerCaching;
[Write, Description("Admin provided description of the Device Configuration.")] String Description;
[Required, Description("Admin provided name of the device configuration.")] String DisplayName;
[Key, Description("Admin provided name of the device configuration.")] String DisplayName;
[Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags;
[Key, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[];
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
Expand Down
Loading

0 comments on commit 90ac71d

Please sign in to comment.