Examples of obtaining Windows app IDs manually
Examples of using manual procedures to obtain app IDs for Windows apps.
Obtaining the App ID for Win32 apps
- To obtain the names and App IDs for all the apps that are installed for the current user, open a
Windows PowerShell command prompt and enter the following command.
$guidMap=@{"{6D809377-6AF0-444B-8957-A3773F02200E}"=$env:ProgramFiles;"{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}"=${env:ProgramFiles(x86)};"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}"=$env:WinDir;"{F38BF404-1D43-42F2-9305-67DE0B28FC23}"=$env:WinDir;"{D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27}"=$env:SystemRoot}; Get-StartApps | Where-Object { $_.AppID -notmatch "!" -and $_.AppID -notmatch "^Microsoft\.AutoGenerated\." } | Sort-Object Name | Select-Object Name,@{Name="AppID";Expression={$id=$_.AppID; foreach($guid in $guidMap.Keys){$id=$id -replace [regex]::Escape($guid),$guidMap[$guid]}; $id}} | Format-Table -AutoSize -WrapFor more information about obtaining App IDs for Windows apps, see https://learn.microsoft.com/en-us/windows/configuration/find-the-application-user-model-id-of-an-installed-app#to-find-the-aumid-by-using-windows-powershell.
Obtaining the App ID for Universal Windows Platform (UWP) apps
- To obtain the names and App IDs for all the UWP apps, open a Windows PowerShell command prompt and enter the following command.
$aumidList = foreach ($app in Get-AppxPackage) { foreach ($id in (Get-AppxPackageManifest $app).Package.Applications.Application.Id) { "$($app.PackageFamilyName)!$id" } }; $aumidList
Example to obtain the App ID for Universal Windows Platform (UWP) apps
Sample app: Microsoft OneNote- Install the app on any Windows machine.
- Install PowerShell (if PowerShell is not installed already).
- Start PowerShell as the admin.
- To view information about an app that you know by name or partially by name, use Get-AppxPackage *<app_name>. You can also use wildcard characters if you do not know the entire name of the app. For example, to view information about OneNote, use Get-AppxPackage *OneNote.
- The following information is displayed.
Name: Microsoft.Office.OneNotePublisher: CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=USArchitecture: X64ResourceId:Version: 17.6769.57631.0PackageFullName: Microsoft.Office.OneNote_17.6769.57631.0_x64__8wekyb3d8bbweInstallLocation: C:\Program Files\WindowsApps \Microsoft.Office.OneNote_17.6769.57631.0_x64__8wekyb3d8bbweIsFramework: FalsePackageFamilyName: Microsoft.Office.OneNote_8wekyb3d8bbwePublisherId: 8wekyb3d8bbwe
Obtaining the App shortcut path for Win32 Shortcut apps
- To obtain the shortcuts for Win32 apps (
.lnk) that are installed at the user level, go to the following path: %AppData%\Microsoft\Windows\Start Menu\Programs and select the required shortcut. You must copy the shortcut path and paste in the App shortcut path. The value of%AppData%isC:\Users\< Logged-in OS User>\AppData\Roaming. - To obtain the shortcuts for Win32 apps (
.lnk) that are installed at the system level (for all users), go to the following path: %ProgramData%\Microsoft\Windows\Start Menu\Programs and select the required shortcut. You must copy the shortcut path and paste in the App shortcut path. The value of%ProgramData%isC:\ProgramData.
Example to obtain the App Name and Publisher ID for Desktop apps
To allow or block Windows apps for the Application Compliance policy, you must define the app list by using app names or the publisher ID.
- Install the app on a Windows machine.
- Install PowerShell (if PowerShell is not installed already).
- Start PowerShell as the admin.
- To view information about the path of an app, use Get-AppLockerFileInformation -Path
"<path of the exe/msi>". For example, Get-AppLockerFileInformation -Path "C:\Program Files\Internet Explorer\iexplore.exe"
Path AppX Publisher Hash %PROGRAMFILES%\INTERNET EXPLORER\IEXPLORE.EXE O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\INTERNET EXPLORER\IEXPLORE.EXE,11.0.17134.1 SHA256 0x06A0274B5ED7313A1D1FDAF08B1B4CB31BF5B5A5DD3A863BF9D16392EE643FA0 False Enter O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US in the Publisher Name field and INTERNET EXPLORER in the App Name field.
Note: This syntax works for Windows OS only.For example, Get-AppLockerFileInformation -Path "C:\MSI\ProjectMyScreenApp.msi"Path Publisher Hash AppX %OSDRIVE%\USERS\MAYURESHKULKARNI\DOWNLOADS\PROJECTMYSCREENAPP.MSI SHA256 0xDAFBF6308D0BF25EA5F9004A3301CBCA3FF131AA37A395DEFE409D8DC2DBC855 False Enter O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US in the Publisher Name field and PROJECT MY SCREEN APP in the App Name field.
Note: This syntax works for Windows OS only.