WS1 Queued App to Readable Name

Another quick and dirty function, it does have a pre-requisite of the function found here: https://wsnone.com/2023/03/ws1-status-code-powershell-function/

What this does is converts the guid found in HKEY_LOCAL_MACHINE\SOFTWARE\AirWatchMDM\AppDeploymentAgent\Queue\ and outputs the actual name of the application and the status code.

If you look at one of the Queued Items, its a very unhelpful looking:

The ManifestID corresponds to the GUID found under the HKEY_LOCAL_MACHINE\SOFTWARE\AirWatchMDM\AppDeploymentAgent\S-1-5 keys.

Nothing too special about this one, run it, read the output.

Function Get-WS1QueuedApps
    {
    $QueueRegPath="hklm:\SOFTWARE\AirWatchMDM\AppDeploymentAgent\Queue\"
    $RegKeys=Get-ChildItem -Path $QueueRegPath
    $SiDKeys=Get-ChildItem -Path "hklm:\SOFTWARE\AirWatchMDM\AppDeploymentAgent\S-1-5*\*"
    $Output=@()
        Foreach ($reg in $RegKeys)
            {
            $properties=Get-ItemProperty $reg.PSPath
            $ManiFestID=$properties.manifestID
            $KeyToquery=($SiDKeys.name -like "*$ManiFestID*") -replace "HKEY_LOCAL_MACHINE","hklm:"
            $AppDetails=Get-ItemProperty $KeyToquery
            $QueuedAppName=$AppDetails.Name
            $QUeuedAppStatusCode=Get-StatusCode $properties.StatusCode
    
            $Data=New-Object psobject
    
            Add-Member -InputObject $Data -MemberType NoteProperty -Name "Queued Application Name" -Value $QueuedAppName
            Add-Member -InputObject $Data -MemberType NoteProperty -Name "Queued Application Status Code" -Value $QUeuedAppStatusCode
            $Output += $Data
        }
    Return $Output
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.