Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Test-AppList.ps1 #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Scripts/Test-AppList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ Process {

# Foreach application in appList.json, check existence in Intunem and determine if new application / version should be published
$AppsProcessList = Get-Content -Path $AppsProcessListFilePath -ErrorAction "Stop" | ConvertFrom-Json

#Retrieve all apps from Intune
$Win32AppResources = Invoke-MSGraphOperation -Get -APIVersion "Beta" -Resource "deviceAppManagement/mobileApps?`$filter=isof('microsoft.graph.win32LobApp')"

foreach ($App in $AppsProcessList) {
Write-Output -InputObject "[APPLICATION: $($App.IntuneAppName)] - Initializing"

Expand Down Expand Up @@ -367,7 +371,6 @@ Process {

# Attempt to locate the application in Intune
Write-Output -InputObject "Attempting to find application in Intune using naming convention: $($AppDisplayName)"
$Win32AppResources = Invoke-MSGraphOperation -Get -APIVersion "Beta" -Resource "deviceAppManagement/mobileApps?`$filter=isof('microsoft.graph.win32LobApp')"
if ($Win32AppResources -ne $null) {

# Detect Win32 application matching displayName
Expand Down Expand Up @@ -501,4 +504,4 @@ Process {
Write-Output -InputObject "##vso[task.setvariable variable=shouldrun;isOutput=true]false"
throw "$($MyInvocation.MyCommand): Failed to retrieve authentication token with error message: $($_.Exception.Message)"
}
}
}