This commit is contained in:
Mikael Karlsson
2024-10-12 12:53:24 +11:00
parent 5326bd5525
commit c6fcf58d4d
37 changed files with 93455 additions and 92040 deletions

View File

@@ -11,7 +11,7 @@ Objects can be compared based on Properties or Documentatation info.
function Get-ModuleVersion
{
'1.1.0'
'1.2.0'
}
function Invoke-InitializeModule
@@ -639,7 +639,8 @@ function Start-BulkCompareExportObjects
else
{
$sourceObj = Get-GraphObject $curObject.Object $curObject.ObjectType
$fileObj.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$fileObj.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$fileObj.Object | Add-Member Noteproperty -Name "@ObjectFileName" -Value $fileObj.FileInfo.FullName -Force
$compareProperties = Compare-Objects $sourceObj.Object $fileObj.Object $item.ObjectType
}
@@ -825,7 +826,8 @@ function Start-BulkCompareExportIntuneToNamedExportedObjects
else
{
$sourceObj = Get-GraphObject $graphObject.Object $graphObject.ObjectType
$fileObj.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$fileObj.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$fileObj.Object | Add-Member Noteproperty -Name "@ObjectFileName" -Value $fileObj.FileInfo.FullName -Force
$compareProperties = Compare-Objects $sourceObj.Object $fileObj.Object $item.ObjectType
}
@@ -1008,8 +1010,10 @@ function Start-BulkCompareExportFolders
}
else
{
$fileSourceObj.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$fileSourceObj.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$fileSourceObj.Object | Add-Member Noteproperty -Name "@ObjectFileName" -Value $fileSourceObj.FileInfo.FullName -Force
$compareObject.Object | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$compareObject.Object | Add-Member Noteproperty -Name "@ObjectFileName" -Value $compareObject.FileInfo.FullName -Force
$compareProperties = Compare-Objects $compareObject.Object $fileSourceObj.Object $item.ObjectType
}
@@ -1297,6 +1301,7 @@ function Start-CompareExportObject
}
}
$compareObj | Add-Member Noteproperty -Name "@ObjectFileName" -Value $global:txtCompareFile.Text -Force
$compareObj | Add-Member Noteproperty -Name "@ObjectFromFile" -Value $true -Force
$compareResult = Compare-Objects $obj.Object $compareObj $obj.ObjectType
@@ -1381,7 +1386,7 @@ function Compare-ObjectsBasedonProperty
$coreProps = @((?? $objectType.NameProperty "displayName"), "Description", "Id", "createdDateTime", "lastModifiedDateTime", "version")
$postProps = @("Advertisements")
$skipProps = @("@ObjectFromFile")
$skipProps = @("@ObjectFromFile","@ObjectFileName")
$skipPropertiesToCompare = @()
if($skipBasicProperties) {
$skipPropertiesToCompare += "roleScopeTagIds"

View File

@@ -20,7 +20,7 @@ $global:documentationProviders = @()
function Get-ModuleVersion
{
'2.2.1'
'2.3.0'
}
function Invoke-InitializeModule
@@ -228,6 +228,7 @@ function Get-ObjectDocumentation
$script:applicabilityRules = @()
$script:objectAssignments = @()
$script:objectScripts = @()
$script:customTables = @()
$script:admxCategories = $null
$script:ObjectTypeFullTable = @{} # Hash table with objects that should be documented in a single table eg ScopeTags
@@ -351,6 +352,7 @@ function Get-ObjectDocumentation
Settings = $script:objectSettingsData
ComplianceActions = $script:objectComplianceActionData
ApplicabilityRules = $script:applicabilityRules
CustomTables = $script:customTables
Assignments = $script:objectAssignments
Scripts = $script:objectScripts
DisplayProperties = $properties
@@ -386,11 +388,40 @@ function Invoke-ObjectDocumentation
$global:intentCategoryDefs = $null
$global:cfgCategories = $null
$script:admxCategories = $null
$script:migTable = $null
$script:DocumentationLanguage = "en"
$script:objectSeparator = [System.Environment]::NewLine
$script:propertySeparator = ","
$loadExportedInfo = $false
if($documentationObj.Object."@ObjectFileName") {
$path = [IO.Path]::GetDirectoryName($documentationObj.Object."@ObjectFileName")
for($i = 0;$i -lt 2;$i++)
{
if($i -gt 0)
{
# Get parent directory
$path = [io.path]::GetDirectoryName($path)
}
$migFileName = Join-Path $path "MigrationTable.json"
try
{
if([IO.File]::Exists($migFileName))
{
Write-Log "Load Migration table from $migFileName"
$script:migTable = ConvertFrom-Json (Get-Content $migFileName -Raw)
}
}
catch {}
}
if(-not $script:migTable) {
Write-Log "Migration table not found" 2
}
}
Get-ObjectDocumentation $documentationObj
}
@@ -636,6 +667,19 @@ function Add-BasicDefaultValues
}
}
function Add-CustomTable
{
param($TableId, $Columns = @("Name", "Value"), $Values, [int]$Order = 100, $LanguageId = "")
$script:customTables += [PSCustomObject]@{
Id = $TableId
Columns = $Columns
Values = $Values
LanguageId = $LanguageId
Order = $Order
}
}
function Add-BasicAdditionalValues
{
param($obj, $objectType)
@@ -4385,7 +4429,7 @@ function local:Invoke-StartDocumentatiom
$migFileName = [IO.Path]::Combine($diSource.FullName,"MigrationTable.json")
if([IO.File]::Exists($migFileName) -eq $false)
{
Write-Log "MigrationTable not found. Groups will be documented with GroupId" 2
Write-Log "MigrationTable not found. Groups will be documented with GroupId" 2
}
else
{
@@ -4927,7 +4971,11 @@ function Invoke-CSVProcessItem
{
if($documentedObj.Assignments[0].RawIntent)
{
$properties = @("GroupMode","Group","Category","SubCategory")
$properties = @("GroupMode","Group","Category","SubCategory")
}
elseif($documentedObj.Assignments[0].Group)
{
$properties = @("GroupMode","Group","Category")
}
else
{

View File

@@ -10,7 +10,7 @@ This module will also document some objects based on PowerShell functions
function Get-ModuleVersion
{
'1.6.5'
'1.6.6'
}
function Invoke-InitializeModule
@@ -76,7 +76,8 @@ function Invoke-CDDocumentObject
Properties = @("Name","Value")
}
}
elseif($type -eq '#microsoft.graph.androidManagedStoreAppConfiguration') {
elseif($type -eq '#microsoft.graph.androidForWorkMobileAppConfiguration' -or
$type -eq '#microsoft.graph.androidManagedStoreAppConfiguration') {
Invoke-CDDocumentAndroidManagedStoreAppConfiguration $documentationObj
@@ -84,8 +85,7 @@ function Invoke-CDDocumentObject
Properties = @("Name","Value","Category","SubCategory")
}
}
elseif($type -eq '#microsoft.graph.androidForWorkMobileAppConfiguration' -or
$type -eq '#microsoft.graph.iosMobileAppConfiguration')
elseif($type -eq '#microsoft.graph.iosMobileAppConfiguration')
{
Invoke-CDDocumentMobileAppConfiguration $documentationObj
return [PSCustomObject]@{
@@ -186,7 +186,7 @@ function Get-CDAllCloudApps
{
if(-not $script:allCloudApps)
{
$script:allCloudApps = (Invoke-GraphRequest -url "/servicePrincipals?`$select=displayName,appId&top=999" -ODataMetadata "minimal").value
$script:allCloudApps = (Invoke-GraphRequest -url "/servicePrincipals?`$select=displayName,appId&top=999" -ODataMetadata "minimal" -AllPages).value
}
$script:allCloudApps
}
@@ -198,7 +198,7 @@ function Get-CDAllTenantApps
$script:allTenantApps = Get-DocOfflineObjects "Applications"
if(-not $script:allTenantApps)
{
$script:allTenantApps =(Invoke-GraphRequest -url "/deviceAppManagement/mobileApps?`$select=displayName,id&top=999" -ODataMetadata "minimal").value
$script:allTenantApps =(Invoke-GraphRequest -url "/deviceAppManagement/mobileApps?`$select=displayName,id&top=999" -ODataMetadata "minimal" -AllPages).value
}
}
$script:allTenantApps
@@ -1885,26 +1885,20 @@ function Invoke-CDDocumentAndroidManagedStoreAppConfiguration
}
# Not the best way. BundleId should be used but then full app info is required
if($obj.packageId -eq "com.microsoft.office.outlook*")
if($obj.packageId -eq "com.microsoft.office.outlook")
{
if([IO.File]::Exists(($global:AppRootFolder + "\Documentation\ObjectInfo\#AppConfigOutlookDevice.json")))
{
$tmp = $obj.settings | Where { $_.appConfigKey -eq "com.microsoft.outlook.EmailProfile.AccountType" }
$tmp = $payloadData.managedProperty | Where { $_.key -eq "com.microsoft.outlook.EmailProfile.AccountType" }
if($tmp){ $configEmail=$true }else{ $configEmail=$false }
$outlookSettings = [PSCustomObject]@{
configureEmail = $configEmail
}
foreach($setting in $obj.settings)
foreach($managedProperty in $payloadData.managedProperty)
{
if($setting.appConfigKeyType -eq "booleanType")
{
$value = $setting.appConfigKeyValue -eq "true"
}
else
{
$value = $setting.appConfigKeyValue
}
$outlookSettings | Add-Member Noteproperty -Name $setting.appConfigKey -Value $value -Force
$valueProperty = $managedProperty.PSObject.Properties | Where-Object Name -like "value*"
$outlookSettings | Add-Member Noteproperty -Name $managedProperty.key -Value $valueProperty.Value -Force
}
$jsonObj = Get-Content ($global:AppRootFolder + "\Documentation\ObjectInfo\#AppConfigOutlookDevice.json") | ConvertFrom-Json
@@ -1914,6 +1908,8 @@ function Invoke-CDDocumentAndroidManagedStoreAppConfiguration
$addedSettings = Get-DocumentedSettings
$additionalSettings = @()
foreach($managedProperty in $payloadData.managedProperty)
{
if(($addedSettings | Where EntityKey -eq $managedProperty.key)) { continue }
@@ -1926,14 +1922,44 @@ function Invoke-CDDocumentAndroidManagedStoreAppConfiguration
$value = $value -join ","
}
Add-CustomSettingObject ([PSCustomObject]@{
$additionalSettings += ([PSCustomObject]@{
Name = $managedProperty.key
ValueType = $valueProperty.Name.SubString(5)
Value = $value
EntityKey = $managedProperty.key
Category = Get-LanguageString "TACSettings.generalSettings"
SubCategory = Get-LanguageString "SettingDetails.additionalConfiguration"
})
}
if($additionalSettings.Count -gt 0) {
Add-CustomTable "AdditionalSettings" @("Name","ValueType","Value") $additionalSettings -Order 110
}
$permissions = @()
foreach($permission in $obj.permissionActions)
{
$permissionTemp = $permission.permission.Split('.')[-1]
if($permissionTemp) {
$permissionLngId = $permissionTemp -replace "_", ""
$permissionStr = ?? (Get-LanguageString "AndroidForWorkAppPermissions.Permissions.$($permissionLngId)") $permissionTemp
}
else {
$permissionStr = $permission.permission
}
$permissions += ([PSCustomObject]@{
Permission = $permissionStr
Action = ?? (Get-LanguageString "AndroidForWorkAppPermissions.Action.$($permission.action)") $permission.action
EntityKey = $permission.permission
})
}
if($permissions.Count -gt 0) {
Add-CustomTable "Permissions" @("Permission","Action") $permissions -Order 115 -LanguageId "AndroidForWorkAppPermissions.permissionsTitle"
}
}
}
@@ -2002,8 +2028,18 @@ function Invoke-CDDocumentMobileAppConfiguration
}
else
{
$isOutlook = $false
foreach($targetedAppId in $obj.targetedMobileApps) {
$app = $allApps | Where Id -eq $targetedAppId
if($app.displayName -eq "Microsoft Outlook") {
$isOutlook = $true
break
}
}
# Not the best way. BundleId should be used but then full app info is required
if(($obj.packageId | Where { $_.appConfigKey -like "com.microsoft.outlook*" }))
if($isOutlook -or ($obj.packageId | Where { $_.appConfigKey -like "com.microsoft.outlook*" }))
{
if([IO.File]::Exists(($global:AppRootFolder + "\Documentation\ObjectInfo\#AppConfigOutlookDevice.json")))
{
@@ -3139,7 +3175,7 @@ function Invoke-CDDocumentConditionalAccess
Add-CustomSettingObject ([PSCustomObject]@{
Name = Get-LanguageString "AzureCA.WhatIfBlade.authenticationStrength"
Value = $termsOfUse -join $script:objectSeparator
Value = $authenticationStrngth -join $script:objectSeparator
Category = $category
SubCategory = ""
EntityKey = "authenticationStrength"

View File

@@ -1,6 +1,6 @@
function Get-ModuleVersion
{
'1.0.1'
'1.1.0'
}
function Invoke-InitializeModule
@@ -332,7 +332,9 @@ function Invoke-HTMLProcessItem
$lngId = ?: ($tableType -eq "BasicInfo") "SettingDetails.basics" "TableHeaders.settings" -AddCategories
Add-HTMLTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId -AddCategories -AddSubcategories
if(($documentedObj.$tableType).Count -gt 0) {
Add-HTMLTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId -AddCategories -AddSubcategories
}
}
if(($documentedObj.ComplianceActions | measure).Count -gt 0)
@@ -351,6 +353,11 @@ function Invoke-HTMLProcessItem
Add-HTMLObjectSettings $obj $objectType $documentedObj
foreach($customTable in ($documentedObj.CustomTables | Sort-Object -Property Order))
{
Add-HTMLTableItems $obj $objectType $customTable.Values $customTable.Columns $customTable.LanguageId -AddCategories -AddSubcategories
}
if(($documentedObj.Assignments | measure).Count -gt 0)
{
if($documentedObj.Assignments[0].RawIntent)

View File

@@ -1,6 +1,6 @@
function Get-ModuleVersion
{
'1.1.1'
'1.2.0'
}
function Invoke-InitializeModule
@@ -285,7 +285,9 @@ function Invoke-MDProcessItem
$lngId = ?: ($tableType -eq "BasicInfo") "SettingDetails.basics" "TableHeaders.settings" -AddCategories
Add-MDTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId -AddCategories -AddSubcategories
if(($documentedObj.$tableType).Count -gt 0) {
Add-MDTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId -AddCategories -AddSubcategories
}
#Add-MDTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId `
# -AddCategories:($global:chkMDAddCategories.IsChecked -eq $true) `
@@ -308,6 +310,11 @@ function Invoke-MDProcessItem
Add-MDObjectSettings $obj $objectType $documentedObj
foreach($customTable in ($documentedObj.CustomTables | Sort-Object -Property Order))
{
Add-MDTableItems $obj $objectType $documentedObj $customTable.Values $customTable.Columns $customTable.LanguageId -AddCategories -AddSubcategories
}
if(($documentedObj.Assignments | measure).Count -gt 0)
{
if($documentedObj.Assignments[0].RawIntent)

View File

@@ -3,7 +3,7 @@
#https://docs.microsoft.com/en-us/office/vba/api/overview/word
function Get-ModuleVersion
{
'1.6.0'
'1.7.0'
}
function Invoke-InitializeModule
@@ -208,7 +208,7 @@ function Invoke-WordPreProcessItems
{
try
{
$script:doc = $wordApp.Documents.Add($global:txtWordDocumentTemplate.Text)
$script:doc = $script:wordApp.Documents.Add($global:txtWordDocumentTemplate.Text)
}
catch
{
@@ -217,7 +217,7 @@ function Invoke-WordPreProcessItems
}
else
{
$script:doc = $wordApp.Documents.Add()
$script:doc = $script:wordApp.Documents.Add()
}
#Get BuiltIn properties
@@ -547,10 +547,12 @@ function Invoke-WordProcessItem
$lngId = ?: ($tableType -eq "BasicInfo") "SettingDetails.basics" "TableHeaders.settings" -AddCategories
Add-DocTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId `
if(($documentedObj.$tableType).Count -gt 0) {
Add-DocTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId `
-AddCategories:($global:chkWordAddCategories.IsChecked -eq $true) `
-AddSubcategories:($global:chkWordAddSubCategories.IsChecked -eq $true) `
-ForceFullValue:($tableType -eq "BasicInfo")
}
}
if($global:cbWordDocumentationLevel.SelectedValue -ne "basic")
@@ -570,6 +572,11 @@ function Invoke-WordProcessItem
}
Add-DocObjectSettings $obj $objectType $documentedObj
foreach($customTable in ($documentedObj.CustomTables | Sort-Object -Property Order))
{
Add-DocTableItems $obj $objectType $documentedObj $customTable.Values $customTable.Columns $customTable.LanguageId -AddCategories -AddSubcategories
}
}
if(($documentedObj.Assignments | measure).Count -gt 0)

View File

@@ -10,7 +10,7 @@ This module is for the Endpoint Manager/Intune View. It manages Export/Import/Co
#>
function Get-ModuleVersion
{
'3.9.7'
'3.9.8'
}
function Invoke-InitializeModule
@@ -472,8 +472,9 @@ function Invoke-InitializeModule
ViewID = "IntuneGraphAPI"
Permissons=@("DeviceManagementApps.ReadWrite.All")
Dependencies = @("Applications")
PreFilesImportCommand = { Start-PreFilesImportAppConfiguration @args }
PreImportAssignmentsCommand = { Start-PreImportAssignmentsAppConfiguration @args }
#PostExportCommand = { Start-PostExportAppConfiguration @args }
PostExportCommand = { Start-PostExportAppConfiguration @args }
Icon = "AppConfiguration"
GroupId = "AppConfiguration"
})
@@ -674,6 +675,8 @@ function Invoke-InitializeModule
QUERYLIST = "`$filter=microsoft.graph.androidManagedStoreAppConfiguration/appSupportsOemConfig%20eq%20true"
API = "/deviceAppManagement/mobileAppConfigurations"
PreImportAssignmentsCommand = { Start-PreImportAssignmentsAppConfiguration @args }
PreFilesImportCommand = { Start-PreFilesImportAppConfiguration @args }
PostExportCommand = { Start-PostExportAppConfiguration @args }
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
Icon="DeviceConfiguration"
Dependencies = @("Applications")
@@ -1961,7 +1964,134 @@ function Start-PostExportAppConfiguration
{
param($obj, $objectType, $path)
Add-EMAssignmentsToExportFile $obj $objectType $path
#Add-EMAssignmentsToExportFile $obj $objectType $path
Write-Log "Export app config for $($objectType.Id) with OData.Type: $($obj.'@OData.Type')"
if($obj.'@OData.Type' -eq "#microsoft.graph.androidManagedAppProtection" -or
$obj.'@OData.Type' -eq "#microsoft.graph.androidForWorkMobileAppConfiguration" -or
$obj.'@OData.Type' -eq "#microsoft.graph.androidManagedStoreAppConfiguration" -or
$obj.'@OData.Type' -eq "#microsoft.graph.iosMobileAppConfiguration")
{
$fileName = (Get-GraphObjectName $obj $objectType).Trim('.')
if((Get-SettingValue "AddIDToExportFile") -eq $true -and $obj.Id)
{
$fileName = ($fileName + "_" + $obj.Id)
}
$tmpObj = $null
$fileName = "$path\$((Remove-InvalidFileNameChars $fileName)).json"
if([IO.File]::Exists($fileName))
{
$tmpObj = Get-GraphObjectFromFile $fileName
}
else
{
Write-Log "File not found: $fileName. Could not add App names." 3
}
if(($tmpObj.targetedMobileApps | measure).Count -gt 0)
{
Write-Log "Add target apps info"
$targetedApps = @()
foreach($appId in $tmpObj.targetedMobileApps)
{
$appObj = Invoke-GraphRequest -Url "/deviceAppManagement/mobileApps/$($appId)" #?`select=id,displayName" -ODataMetadata "Minimal"
if($appObj)
{
Write-Log "Add target app info $($appObj.displayName) ($($appObj.Id)) of type $($appObj.'@OData.Type')"
$targetedApps += $appObj.displayName + '|!|' + $appObj.Id + '|!|' + $appObj.'@OData.Type'
}
}
if($targetedApps.Count -gt 0)
{
Write-Log "Add CustomRefTargetedApps property"
$tmpObj | Add-Member -MemberType NoteProperty -Name "#CustomRefTargetedApps" -Value ($targetedApps -join "|*|")
Write-Log "Save file $fileName"
Save-GraphObjectToFile $tmpObj $fileName
}
}
else
{
Write-Log "No target apps found" 2
}
}
}
function Start-PreFilesImportAppConfiguration
{
param($objectType, $filesToImport)
$targetedAppsObjects = $filesToImport | Where { $null -ne $_.Object."#CustomRefTargetedApps" }
if(($targetedAppsObjects | measure).Count -gt 0)
{
Write-Log "Policies with Targeted Apps detected"
foreach($fileObject in $targetedAppsObjects)
{
Add-AppConfigurationTargets $objectType $fileObject
}
}
$filesToImport
}
function local:Add-AppConfigurationTargets
{
param($obj, $fileObj)
if($fileObj.Object."#CustomRefTargetedApps" -and $fileObj.Object.targetedMobileApps)
{
Write-Log "Adding app target for $($fileObj.Object.displayName)"
$targetedAppsInfo = $fileObj.Object."#CustomRefTargetedApps"
$translatedTargetedApps = @()
if($targetedAppsInfo)
{
foreach($targetedApp in ($targetedAppsInfo -split "[|][*][|]"))
{
$appName, $appId, $appType = $targetedApp -split "[|][!][|]"
if(-not $appName -or -not $appId)
{
Write-Log "App Name and Id is missing in string: $appApp" 2
continue
}
$tmpApps = (Invoke-GraphRequest -Url "/deviceAppManagement/mobileApps?`$filter=displayName eq '$appName'").value
if(-not $tmpApps)
{
Write-Log "No application found with name $appName. $appId will not be translated and added to target list" 2
continue
}
Write-Log "Found $(($tmpApps | measure).Count) applications" 2
foreach ($tmpApp in $tmpApps) {
Write-Log "Found '$($tmpApp.displayName)' ($($tmpApp.id)) of type $($($tmpApp.'@OData.Type'))"
}
$tmpApp = $tmpApps | Where-Object '@OData.Type' -eq $appType
if(-not $tmpApp)
{
Write-Log "No $appName application found of type $appType. $appId will not be translated and added to target list" 2
}
elseif(($tmpApp | measure).Count -gt 1) {
Write-Log "$(($tmpApp | measure).Count) applications found with name '$appName' of type $appType. $appId will not be translated and added to target list" 2
}
else {
Write-Log "Found '$appName' with id $($tmpApp.Id) ($appType)"
$translatedTargetedApps += $tmpApp.Id
}
}
if($translatedTargetedApps.Count -gt 0) {
Write-Log "Updating translated targeted apps"
$fileObj.Object.targetedMobileApps = $translatedTargetedApps
}
else {
Write-Log "Could not find targeted apps in the evnironment. Verify that they are added. Policy import might fail" 3
}
}
}
}
function Start-PreImportAssignmentsAppConfiguration
@@ -2479,7 +2609,7 @@ function Start-PostFilesImportApplications
if(($refObjects | measure).Count -gt 0)
{
Write-Log "Applicetions with Depnedency or Supersedence detected"
Write-Log "Applicetions with Dependency or Supersedence detected"
foreach($file in $refObjects)
{
Add-ApplicationReferences $file.ImportedObject $file.Object

View File

@@ -35,16 +35,29 @@ function Invoke-InitializeModule
Add-ViewObject $global:EMInfoViewObject
Add-ViewItem (New-Object PSObject -Property @{
Title = "Baseline Templates"
Title = "Baseline Templates - Intent"
Id = "BaselineTemplates"
ViewID = "EMInfoGraphAPI"
API = "/deviceManagement/templates"
API = "/deviceManagement/templates"
ShowButtons = @("Export","View")
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
Icon="EndpointSecurity"
ExpandAssignmentsList = $false
})
Add-ViewItem (New-Object PSObject -Property @{
Title = "Baseline Templates - Settings Catalog"
Id = "BaselineTemplatesSettingsCatalog"
ViewID = "EMInfoGraphAPI"
API = "/deviceManagement/configurationPolicyTemplates"
QUERYLIST = "`$filter=(templateFamily eq 'Baseline')"
ShowButtons = @("Export","View")
DefaultColumns = "0,displayName=Template Name,displayVersion=Version,lifecycleState=State,baseId=Template Id,id"
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
Icon="EndpointSecurity"
ExpandAssignmentsList = $false
})
Add-ViewItem (New-Object PSObject -Property @{
Title = "Android Google Play"
Id = "AndroidGooglePlay"

View File

@@ -10,7 +10,7 @@ This module manages Authentication for the application with MSAL. It is also res
#>
function Get-ModuleVersion
{
'3.9.7'
'3.9.8a'
}
$global:msalAuthenticator = $null
@@ -119,7 +119,15 @@ function Invoke-InitializeModule
Type = "Boolean"
DefaultValue = $false
Description = "Sort the list of cached accounts based on user name. Updated at restart or account change"
}) "MSAL"
}) "MSAL"
Add-SettingsObject (New-Object PSObject -Property @{
Title = "Sort Tenant List"
Key = "SortTenantList"
Type = "Boolean"
DefaultValue = $false
Description = "Sort the list of available tenants based on Tenant name. Updated at restart or account change"
}) "MSAL"
Add-MSALPrereq
}
@@ -1804,8 +1812,18 @@ function Get-MSALProfileEllipse
$lbObj = [Windows.Markup.XamlReader]::Parse("<TextBlock $wpfNS><Bold>Tenants:</Bold></TextBlock>")
$lbObj.Margin = "0,5,0,0"
if((Get-SettingValue "SortTenantList") -eq $true)
{
$tenants = $script:AccessableTenants | Sort -Property DisplayName
}
else
{
$tenants = $script:AccessableTenants
}
Add-GridObject $otherLogins $lbObj
foreach($tenant in $script:AccessableTenants)
foreach($tenant in $tenants)
{
try
{

View File

@@ -10,7 +10,7 @@ This module manages Microsoft Grap fuctions like calling APIs, managing graph ob
#>
function Get-ModuleVersion
{
'3.9.6'
'3.9.8a'
}
$global:MSGraphGlobalApps = @(
@@ -804,7 +804,7 @@ function Show-GraphObjects
$tableColumns = @()
$additionalColumns = @()
$additionalColsStr = Get-Setting "EndpointManager\ObjectColumns" "$($global:curObjectType.Id)"
$additionalColsStr = ?? (Get-Setting "EndpointManager\ObjectColumns" "$($global:curObjectType.Id)") $global:curObjectType.DefaultColumns
if($additionalColsStr)
{
$additionalColumns += $additionalColsStr.Split(',')
@@ -2635,7 +2635,8 @@ function Add-GraphMigrationInfo
$objType = $objInfo."@odata.type"
if($objType -eq "#microsoft.graph.groupAssignmentTarget" -or
$objType -eq "#microsoft.graph.exclusionGroupAssignmentTarget")
$objType -eq "#microsoft.graph.exclusionGroupAssignmentTarget" -or
$objType -eq "#microsoft.graph.cloudPcManagementGroupAssignmentTarget")
{
Add-GraphMigrationObject $objInfo.groupid "/groups" "Group"
}
@@ -4169,7 +4170,7 @@ function local:Add-ObjectColumnInfoClass
function Local:Show-ObjectDefaultColumnsSettings
{
$strColSettings = Get-Setting "EndpointManager\ObjectColumns" "$($global:curObjectType.Id)"
$strColSettings = ?? (Get-Setting "EndpointManager\ObjectColumns" "$($global:curObjectType.Id)") $global:curObjectType.DefaultColumns
$script:colObjectProperties.Clear()
$defaultColumns = (?? $global:curObjectType.ViewProperties (@("displayName","description","id")))
if($strColSettings)