diff --git a/ListIntuneTemplates/run.ps1 b/ListIntuneTemplates/run.ps1 index fbc97d2909d9..63b32dc5af22 100644 --- a/ListIntuneTemplates/run.ps1 +++ b/ListIntuneTemplates/run.ps1 @@ -23,6 +23,16 @@ $Templates = Get-ChildItem "Config\*.IntuneTemplate.json" | ForEach-Object { $Table = Get-CippTable -tablename 'templates' $Filter = "PartitionKey eq 'IntuneTemplate'" $Templates = (Get-AzDataTableEntity @Table -Filter $Filter).JSON | ConvertFrom-Json +if ($Request.query.View) { + $Templates = $Templates | ForEach-Object { + $data = $_.RAWJson | ConvertFrom-Json + $data | Add-Member -NotePropertyName "displayName" -NotePropertyValue $_.Displayname + $data | Add-Member -NotePropertyName "description" -NotePropertyValue $_.Description + $data | Add-Member -NotePropertyName "Type" -NotePropertyValue $_.Type + $data | Add-Member -NotePropertyName "GUID" -NotePropertyValue $_.GUID + $data + } +} if ($Request.query.ID) { $Templates = $Templates | Where-Object -Property guid -EQ $Request.query.id }