Fixed issue with installing Intune module
Added support for viewing object info
This commit is contained in:
@@ -100,7 +100,7 @@ function Get-AppProtections
|
||||
$global:lstFiles.ItemsSource = @(Get-JsonFileObjects $global:txtImportPath.Text -Exclude "*_Settings.json")
|
||||
}
|
||||
|
||||
Add-DefaultObjectButtons -export ([scriptblock]{Show-DefaultExportGrid @script:exportParams}) -import ([scriptblock]{Show-DefaultImportGrid -ImportAll $script:importAll -ImportSelected $script:importSelected -GetFiles $script:getImportFiles}) -copy ([scriptblock]{Copy-AppProtection})
|
||||
Add-DefaultObjectButtons -export ([scriptblock]{Show-DefaultExportGrid @script:exportParams}) -import ([scriptblock]{Show-DefaultImportGrid -ImportAll $script:importAll -ImportSelected $script:importSelected -GetFiles $script:getImportFiles}) -copy ([scriptblock]{Copy-AppProtection}) -ViewFullObject ([scriptblock]{Get-AppProtectionObject $global:dgObjects.SelectedItem.Object}) -ForceFullObject
|
||||
}
|
||||
|
||||
function Get-AppProtectionObjects
|
||||
@@ -108,6 +108,26 @@ function Get-AppProtectionObjects
|
||||
Get-GraphObjects -Url "/deviceAppManagement/managedAppPolicies"
|
||||
}
|
||||
|
||||
function Get-AppProtectionObject
|
||||
{
|
||||
param($object, $additional = "")
|
||||
|
||||
if(-not $object.id) { return }
|
||||
|
||||
$objType = Get-AppProtectionObjectType $object."@odata.type"
|
||||
|
||||
$expand = ""
|
||||
if($objType -eq "targetedManagedAppConfigurations")
|
||||
{
|
||||
$expand = "?`$expand=Apps"
|
||||
}
|
||||
|
||||
if($objType)
|
||||
{
|
||||
Invoke-GraphRequest -Url "/deviceAppManagement/$objType/$($object.id)$($expand)"
|
||||
}
|
||||
}
|
||||
|
||||
function Export-AllAppProtections
|
||||
{
|
||||
param($path = "$env:Temp")
|
||||
|
||||
Reference in New Issue
Block a user