Fix renaming Settings Catalog policies
This commit is contained in:
Mikael Karlsson
2025-08-03 20:12:34 +10:00
parent a0bac61ba4
commit 8952e2894a
2 changed files with 5 additions and 5 deletions

View File

@@ -221,7 +221,7 @@ function Invoke-InitializeModule
Id = "CompliancePoliciesV2"
ViewID = "IntuneGraphAPI"
API = "/deviceManagement/compliancePolicies"
NameProperty = "Name"
NameProperty = "name"
PropertiesToRemove = @('settingCount')
ViewProperties = @("name","description","Id")
Expand="settings"
@@ -606,7 +606,7 @@ function Invoke-InitializeModule
API = "/deviceManagement/configurationPolicies"
PropertiesToRemove = @('settingCount')
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
NameProperty = "Name"
NameProperty = "name"
ViewProperties = @("name","description","Id")
Expand="Settings"
Icon="DeviceConfiguration"
@@ -625,7 +625,7 @@ function Invoke-InitializeModule
API = "/deviceManagement/inventoryPolicies"
PropertiesToRemove = @('settingCount')
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
NameProperty = "Name"
NameProperty = "name"
ViewProperties = @("name","description","Id")
Expand="Settings"
Icon="DeviceConfiguration"

View File

@@ -4082,8 +4082,8 @@ function Show-GraphObjectInfo
return
}
# Save settings here...
$nameProp = (?? $global:dgObjects.SelectedItem.Object.NameProperty "displayName")
$idProp = (?? $global:dgObjects.SelectedItem.Object.IDProperty "id")
$nameProp = (?? $global:dgObjects.SelectedItem.ObjectType.NameProperty "displayName")
$idProp = (?? $global:dgObjects.SelectedItem.ObjectType.IDProperty "id")
$updateObj = [PSCustomObject]@{
$idProp = $global:dgObjects.SelectedItem.Object."$idProp"