WindowsCapability -and WindowsPackage
You will need to install the OSD Module version 21.2.8.2 or higher
Windows Capabilities and Windows Packages have extremely long names. Most of us have gotten quite good and guessing what they are
To get a list of all Windows Packages that are Installed (or Superseded) on your computer, simply run the following command in PowerShell
1
(Get-WindowsPackage -Online).PackageName
2
(Get-WindowsCapability -Online).Name
Copied!
Here are some examples that were returned on my system
1
Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.746
2
Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1
3
Microsoft-Windows-TabletPCMath-Package~31bf3856ad364e35~amd64~~10.0.19041.746
4
Microsoft-Windows-WordPad-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1
5
Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.685.1.6
Copied!

Tilde Delimitator

While the long name may be a challenge to read as a complete string, you can separate each of the Windows Packages or Windows Capabilities with a Tilde. Like this:
1
"Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.746" -split "~"
2
3
Microsoft-Windows-Client-LanguagePack-Package
4
31bf3856ad364e35
5
amd64
6
en-US
7
10.0.19041.746
Copied!
That's much easier to read now. Once you see the pattern, every Windows Package and Windows Capability follows the same structure
1
[0]ProductName
2
[1]PublicKeyToken
3
[2]Architecture
4
[3]Culture
5
[4]Version
Copied!

Get-MyWindowsPackage

This is a new function in the OSD Module that will split the PackageName making things easier to read. Simply run the following command (-Online is assumed if a Path is not given)
1
Get-MyWindowsPackage | ft
Copied!
Get-MyWindowsPackage | ft
Here is a comparison of Get-WindowsPackage and Get-MyWindowsPackage
1
PS C:\> Get-WindowsPackage -Online | Select -First 1
2
3
PackageName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.488
4
PackageState : Superseded
5
ReleaseType : OnDemandPack
6
InstallTime : 12/3/2020 11:51:00 PM
7
8
9
10
PS C:\> Get-MyWindowsPackage | Select -First 1
11
12
ProductName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package
13
Architecture : amd64
14
Culture :
15
Version : 10.0.19041.488
16
ReleaseType : OnDemandPack
17
PackageState : Superseded
18
InstallTime : 12/3/2020 11:51:00 PM
19
PackageName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.488
20
Online : True
Copied!

Full Details

Another cool thing you can do with Get-WindowsPackage is to give it a PackageName, and it will give you as much detail as you can handle
1
PS C:\> Get-WindowsPackage -Online -PackageName Microsoft-Windows-LanguageFeatures-Basic-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1
2
3
PackageName : Microsoft-Windows-LanguageFeatures-Basic-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1
4
Applicable : True
5
Copyright : Copyright (c) Microsoft Corporation. All Rights Reserved
6
Company :
7
CreationTime :
8
Description : Spelling, text prediction, and document searching for English (US)
9
InstallClient : DISM Package Manager Provider
10
InstallPackageName : Microsoft-Windows-LanguageFeatures-Basic-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1.mum
11
InstallTime : 12/7/2019 9:50:57 AM
12
LastUpdateTime :
13
DisplayName : English (US) typing
14
ProductName : Microsoft-Windows-LanguageFeatures-Basic-en-us-Package
15
ProductVersion :
16
ReleaseType : OnDemandPack
17
RestartRequired : Possible
18
SupportInformation : http://support.microsoft.com/?kbid=777777
19
PackageState : Installed
20
CompletelyOfflineCapable : Undetermined
21
CapabilityId : Language.Basic~~~en-US~0.0.1.0
22
Custom Properties :
23
mum2:OptionalFeatures\SchemaVersion : 1.0
24
mum2:OptionalFeatures\mum2:SettingsPageOptions\Visibility : installed
25
mum2:OptionalFeatures\mum2:SettingsPageOptions\FeatureType : language
26
mum2:OptionalFeatures\mum2:SettingsPageOptions\ManageFeatureSettings : page=SettingsPageTimeRegionLanguage
27
28
Features : {}
Copied!
The same method works with Get-WindowsCapability as well
1
PS C:\> Get-WindowsCapability -Online -Name Rsat.StorageMigrationService.Management.Tools~~~~0.0.1.0
2
3
4
Name : Rsat.StorageMigrationService.Management.Tools~~~~0.0.1.0
5
State : Installed
6
DisplayName : RSAT: Storage Migration Service Management Tools
7
Description : Provides management tools for storage migration jobs.
8
DownloadSize : 124644
9
InstallSize : 834498
Copied!

-Detail

To make things easier, Get-MyWindowsPackage and Get-MyWindowsCapability will do a foreach and get much of these details (this can take some time) by adding the -Detail parameter
1
PS C:\> Get-WindowsPackage -Online | Select -First 1
2
3
PackageName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.488
4
PackageState : Superseded
5
ReleaseType : OnDemandPack
6
InstallTime : 12/3/2020 11:51:00 PM
7
8
9
10
PS C:\> Get-MyWindowsPackage | Select -First 1
11
12
ProductName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package
13
Architecture : amd64
14
Culture :
15
Version : 10.0.19041.488
16
ReleaseType : OnDemandPack
17
PackageState : Superseded
18
InstallTime : 12/3/2020 11:51:00 PM
19
PackageName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.488
20
Online : True
21
22
23
24
PS C:\> Get-MyWindowsPackage -Detail | Select -First 1
25
26
DisplayName : Exchange ActiveSync and Internet Mail Sync engine
27
Architecture : amd64
28
Culture :
29
Version : 10.0.19041.488
30
ReleaseType : OnDemandPack
31
PackageState : Superseded
32
InstallTime : 12/3/2020 11:51:00 PM
33
CapabilityId : OneCoreUAP.OneSync~~~~0.0.1.0
34
Description : OS sync engine for syncing mail, contacts and calendar data. This sync engine is used by UWP apps like Mail, Calendar and People
35
PackageName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.488
36
Online : True
37
ProductName : Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package
Copied!

Wrapping Up

Take the time to play around with the new functions and see what you can do with it
1
PS C:\> (Get-MyWindowsCapability -Category Rsat -Detail).DisplayName
2
RSAT: Active Directory Domain Services and Lightweight Directory Services Tools
3
RSAT: BitLocker Drive Encryption Administration Utilities
4
RSAT: Active Directory Certificate Services Tools
5
RSAT: DHCP Server Tools
6
RSAT: DNS Server Tools
7
RSAT: Failover Clustering Tools
8
RSAT: File Services Tools
9
RSAT: Group Policy Management Tools
10
RSAT: IP Address Management (IPAM) Client
11
RSAT: Data Center Bridging LLDP Tools
12
RSAT: Network Controller Management Tools
13
RSAT: Network Load Balancing Tools
14
RSAT: Remote Access Management Tools
15
RSAT: Remote Desktop Services Tools
16
RSAT: Server Manager
17
RSAT: Shielded VM Tools
18
RSAT: Storage Migration Service Management Tools
19
RSAT: Storage Replica Module for Windows PowerShell
20
RSAT: System Insights Module for Windows PowerShell
21
RSAT: Volume Activation Tools
22
RSAT: Windows Server Update Services Tools
Copied!
Get-MyWindowsCapability
OSD
Get-MyWindowsPackage
OSD