From a0692159b5301cc0674d36506ef822727fa02060 Mon Sep 17 00:00:00 2001 From: Mikael Karlsson <43226266+Micke-K@users.noreply.github.com> Date: Tue, 6 Jul 2021 09:28:06 +1000 Subject: [PATCH] 3.1.5 --- Extensions/Compare.psm1 | 11 +++++++---- Extensions/EndpointManager.psm1 | 18 ++++++++++++++++-- ReleaseNotes.md | 7 +++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Extensions/Compare.psm1 b/Extensions/Compare.psm1 index 1e466f2..c282ec6 100644 --- a/Extensions/Compare.psm1 +++ b/Extensions/Compare.psm1 @@ -11,7 +11,7 @@ Objects can be compared based on Properties or Documentatation info. function Get-ModuleVersion { - '1.0.2' + '1.0.3' } function Invoke-InitializeModule @@ -695,14 +695,17 @@ function Show-CompareForm if($global:txtIntuneObject.Tag.ObjectType) { $objectTypePath = [IO.Path]::Combine($path, $global:txtIntuneObject.Tag.ObjectType.Id) - if([IO.Direcotry]::Exists($objectTypePath)) + if([IO.Directory]::Exists($objectTypePath)) { $path = $objectTypePath } } } - $path = (?: ($global:lastCompareFile -eq $null) $path ([IO.FileInfo]$global:lastCompareFile).DirectoryName) + if([String]::IsNullOrEmpty($global:lastCompareFile) -eq $false) + { + $path = ([IO.FileInfo]$global:lastCompareFile).DirectoryName + } $of = [System.Windows.Forms.OpenFileDialog]::new() $of.Multiselect = $false @@ -711,7 +714,7 @@ function Show-CompareForm { $of.InitialDirectory = $path } - + if($of.ShowDialog()) { Set-XamlProperty $script:cmpForm "txtCompareFile" "Text" $of.FileName diff --git a/Extensions/EndpointManager.psm1 b/Extensions/EndpointManager.psm1 index d39cddf..b995f05 100644 --- a/Extensions/EndpointManager.psm1 +++ b/Extensions/EndpointManager.psm1 @@ -10,7 +10,7 @@ This module is for the Endpoint Manager/Intune View. It manages Export/Import/Co #> function Get-ModuleVersion { - '3.1.4' + '3.1.5' } function Invoke-InitializeModule @@ -253,6 +253,7 @@ function Invoke-InitializeModule PostCopyCommand = { Start-PostCopyAdministrativeTemplate @args } PostFileImportCommand = { Start-PostFileImportAdministrativeTemplate @args } LoadObject = { Start-LoadAdministrativeTemplate @args } + PropertiesToRemove = @("definitionValues") Permissons=@("DeviceManagementConfiguration.ReadWrite.All") Icon="DeviceConfiguration" GroupId = "DeviceConfiguration" @@ -1440,7 +1441,20 @@ function Start-LoadAdministrativeTemplate $obj = Get-Content $fi.FullName | ConvertFrom-Json - return $obj + if($obj.definitionValues) + { + return $obj + } + + $settingsFile = $fi.DirectoryName + "\" + $fi.BaseName + "_Settings.json" + + if([IO.File]::Exists($settingsFile)) + { + $definitionValues = Get-Content $settingsFile | ConvertFrom-Json + + $obj | Add-Member Noteproperty -Name "definitionValues" -Value $definitionValues -Force + } + $obj } #endregion diff --git a/ReleaseNotes.md b/ReleaseNotes.md index ad08c17..740e1c7 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,12 @@ # Release Notes +## 3.1.5 - 2021-07-06 + +**Fixes** + +* Fixed rushed update for [Issue 18](https://github.com/Micke-K/IntuneManagement/issues/18) +* Fixed bug in Compare module + ## 3.1.4 - 2021-07-06 **Fixes**