Skip to content

Commit

Permalink
Merge pull request #1 from scottgray69/IntuneAppProtectionPolicyIos-i…
Browse files Browse the repository at this point in the history
…ssue1719

IntuneAppProtectionPolicyios-Resolve issue1719
  • Loading branch information
menswearUK authored Jan 28, 2022
2 parents f001958 + 11cfc8b commit ac4e621
Show file tree
Hide file tree
Showing 32 changed files with 732 additions and 70 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

# 1.22.126.1

*TeamsTenantDialPlan
* Fixed an issue where the Export only extracted the first
normalization rule.
FIXES #1695
* DEPENDENCIES
* Updated all Microsoft.Graph * to 1.9.2;
* Updated Microsoft.Teams to version 3.1.0;
* MISC
* Update automatic cmdlet documentation generation functions and prereqs.
* Adding cmdlet documentation to website
* Fixed an issue with the Export-M365DSCConfiguration cmdlet where it
would throw an error if no parameters were passed.

# 1.22.119.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1493,21 +1493,21 @@ function Set-TargetResource
if ($IncludeDevices -or $ExcludeDevices)
{
#create and provision Device condition object if used
if (-not $conditions.Contains("Platforms"))
if (-not $conditions.Contains("Devices"))
{
$conditions.Add("Platforms", @{
ExcludePlatforms = @()
IncludePlatforms = @()
$conditions.Add("Devices", @{
ExcludeDevices = @()
IncludeDevices = @()
})
}
else
{
$conditions.Platforms.Add("ExcludeDevices", @())
$conditions.Platforms.Add("IndludeDevices", @())
$conditions.Devices.Add("ExcludeDevices", @())
$conditions.Devices.Add("IndludeDevices", @())
}
$conditions.Platforms.IncludeDevices = $IncludeDevices
$conditions.Devices.IncludeDevices = $IncludeDevices
#no translation or conversion needed
$conditions.Platforms.ExcludeDevices = $ExcludeDevices
$conditions.Devices.ExcludeDevices = $ExcludeDevices
#no translation or conversion needed
}
Write-Verbose -Message "Set-Targetresource: process risk levels and app types"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ function Get-M365DSCIntuneAppProtectionPolicyiOSAssignmentJSON
[System.String[]]
$Assignments,

[Parameter(Mandatory = $true)]
[Parameter(Mandatory = $false)]
[System.String[]]
$Exclusions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,7 @@ function Export-TargetResource

if ($results.NormalizationRules.Count -gt 0)
{
if ($results.NormalizationRules.GetType().Name -eq "Hashtable")
{
$results.NormalizationRules = Get-M365DSCNormalizationRulesAsString $results.NormalizationRules
}
else
{
$results.NormalizationRules = Get-M365DSCNormalizationRulesAsString $results.NormalizationRules[0]
}
$results.NormalizationRules = Get-M365DSCNormalizationRulesAsString $results.NormalizationRules
}
$currentDSCBlock = " TeamsTenantDialPlan " + (New-Guid).ToString() + "`r`n"
$currentDSCBlock += " {`r`n"
Expand Down Expand Up @@ -591,31 +584,37 @@ function Get-M365DSCNormalizationRulesAsString
[OutputType([System.String])]
param(
[Parameter(Mandatory = $true)]
[System.Collections.Hashtable]
[System.Object[]]
$Params
)

if ($null -eq $params)
{
return $null
}
$currentProperty = "@(MSFT_TeamsVoiceNormalizationRule{`r`n"
foreach ($key in $params.Keys)
$currentProperty = "@("

foreach ($rule in $params)
{
if ($key -eq 'Priority')
{
$currentProperty += " " + $key + " = " + $params[$key] + "`r`n"
}
elseif ($key -eq "IsInternalExtension")
{
$currentProperty += " " + $key + " = `$" + $params[$key] + "`r`n"
}
else
$currentProperty += "MSFT_TeamsVoiceNormalizationRule{`r`n"
foreach ($key in $rule.Keys)
{
$currentProperty += " " + $key + " = '" + $params[$key] + "'`r`n"
if ($key -eq 'Priority')
{
$currentProperty += " " + $key + " = " + $rule[$key] + "`r`n"
}
elseif ($key -eq "IsInternalExtension")
{
$currentProperty += " " + $key + " = `$" + $rule[$key] + "`r`n"
}
else
{
$currentProperty += " " + $key + " = '" + $rule[$key] + "'`r`n"
}
}
$currentProperty += " }"
}
$currentProperty += " })"
$currentProperty += ")"
return $currentProperty
}

Expand Down
26 changes: 13 additions & 13 deletions Modules/Microsoft365DSC/Dependencies/Manifest.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,55 @@
},
@{
ModuleName = "Microsoft.Graph.Applications"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Authentication"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.DeviceManagement"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.DeviceManagement.Administration"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.DeviceManagement.Enrolment"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Devices.CorporateManagement"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Groups"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Identity.DirectoryManagement"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Identity.Governance"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Identity.SignIns"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Planner"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Teams"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.Graph.Users"
RequiredVersion = "1.9.1"
RequiredVersion = "1.9.2"
},
@{
ModuleName = "Microsoft.PowerApps.Administration.PowerShell"
Expand Down
29 changes: 14 additions & 15 deletions Modules/Microsoft365DSC/Microsoft365DSC.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2022-01-20
# Generated on: 2022-01-26

@{

# Script module or binary module file associated with this manifest.
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.22.119.2'
ModuleVersion = '1.22.126.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -131,19 +131,18 @@
IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true'

# ReleaseNotes of this module
ReleaseNotes = "
* EXOOrganizationConfig
* Added support for the new SendFromAliasEnabled parameter;
* Fixed issue where the name of the parameter in the module and
in the schema differed;
FIXES #1689
* EXORoleAssignmentPolicy
* Fixed logic to update roles assigned to an existing policy;
FIXES #1538
MISC
* Updated logic for Report generation so that it no longer requires the
same module version as defined in the configuration installed on the
system where the report is being generated from."
ReleaseNotes = "*TeamsTenantDialPlan
* Fixed an issue where the Export only extracted the first
normalization rule.
FIXES #1695
* DEPENDENCIES
* Updated all Microsoft.Graph * to 1.9.2;
* Updated Microsoft.Teams to version 3.1.0;
* MISC
* Update automatic cmdlet documentation generation functions and prereqs.
* Adding cmdlet documentation to website
* Fixed an issue with the Export-M365DSCConfiguration cmdlet where it
would throw an error if no parameters were passed."

# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
Expand Down
9 changes: 9 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCAgent.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.Description
This function tests the configuration of the agent
.Example
Test-M365DSCAgent
.Functionality
Public
#>
Expand Down Expand Up @@ -128,6 +131,12 @@ Specifies that a PFX export should be created for the generated certificate.
.Parameter Password
Specifies the password for the PFX file.
.Example
Set-M365DSCAgentCertificateConfiguration -KeepCertificate
.Example
Set-M365DSCAgentCertificateConfiguration -GeneratePFX -Password 'P@ssword123!'
.Functionality
Public
#>
Expand Down
6 changes: 6 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCLogEngine.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ Specify if the results should be anonymized.
.Parameter Url
(Anonymize=True) The url that should be renamed.
.Example
Export-M365DSCDiagnosticData -ExportFilePath C:\Temp\DSCLogsExport.zip -NumberOfDays 3
.Example
Export-M365DSCDiagnosticData -ExportFilePath C:\Temp\DSCLogsExport.zip -Anonymize -Server spfe -Domain contoso.com -Url sharepoint.contoso.com
.Functionality
Public
#>
Expand Down
12 changes: 12 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCPermissions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ both for reading and updating.
.Parameter ResourceNameList
An array of resource names for which the permissions should be determined.
.Example
Get-M365DSCCompiledPermissionList -ResourceNameList @('O365User', 'AADApplication')
.Functionality
Public
#>
Expand Down Expand Up @@ -88,6 +91,12 @@ Specifies that the permissions should be determined for all resources.
.Parameter Type
For which action should the permissions be updated: Read or Update.
.Example
Update-M365DSCAllowedGraphScopes -ResourceNameList @('O365User', 'AADApplication') -Type 'Read'
.Example
Update-M365DSCAllowedGraphScopes -All -Type 'Update' -Environment 'Global'
.Functionality
Public
#>
Expand Down Expand Up @@ -170,6 +179,9 @@ It is compiling a permissions list based on all used Graph cmdlets in the resour
retrieving the permissions for these cmdlets from the Graph. Then it updates the
settings.json file
.Example
Update-M365DSCResourcesSettingsJSON
.Functionality
Public
#>
Expand Down
12 changes: 12 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCReport.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ The path to the exported DSC configuration that the report should be created for
.Parameter OutputPath
The output path of the report.
.Example
New-M365DSCReportFromConfiguration -Type 'HTML' -ConfigurationPath 'C:\DSC\' -OutputPath 'C:\Dsc\M365Report.html'
.Example
New-M365DSCReportFromConfiguration -Type 'Excel' -ConfigurationPath 'C:\DSC\' -OutputPath 'C:\Dsc\M365Report.xlsx'
.Functionality
Public
#>
Expand Down Expand Up @@ -705,6 +711,12 @@ Specifies that file that contains a custom header for the report.
.Parameter Delta
An array with difference, already compiled from another source.
.Example
New-M365DSCDeltaReport -Source 'C:\DSC\Source.ps1' -Destination 'C:\DSC\Destination.ps1' -OutputPath 'C:\Dsc\DeltaReport.html'
.Example
New-M365DSCDeltaReport -Source 'C:\DSC\Source.ps1' -Destination 'C:\DSC\Destination.ps1' -OutputPath 'C:\Dsc\DeltaReport.html' -DriftOnly $true
.Functionality
Public
#>
Expand Down
6 changes: 6 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCTelemetryEngine.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ Specifies the Instrumention Key to be used to send the telemetry to.
.Parameter ProjectName
Specifies the name of the project to store the telemetry data under.
.Example
Set-M365DSCTelemetryOption -Enabled $false
.Functionality
Public
#>
Expand Down Expand Up @@ -274,6 +277,9 @@ function Set-M365DSCTelemetryOption
.Description
This function gets the configuration for the M365DSC telemetry feature
.Example
Get-M365DSCTelemetryOption
.Functionality
Public
#>
Expand Down
Loading

0 comments on commit ac4e621

Please sign in to comment.