I saw a question about the CIM_Component class and wondered what it was. So I tried it
PS> Get-CimInstance -Namespace root\CIMV2 -ClassName CIM_Component | select -f 1 | fl *
GroupComponent : Win32_Directory (Name = “<directory path>”)
PartComponent : CIM_DataFile (Name = “<file path>”)
PSComputerName :
CimClass : root/CIMV2:CIM_DirectoryContainsFile
CimInstanceProperties : {GroupComponent, PartComponent}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
What you’ll get is a list of every file on your system – showing folder in the GroupComponent (parent) and File in the PartComponent (child).
The documentation is totally accurate and totally useless as it explains that you get a parent-child relationship but not what’s in it!
I’d strongly recommend against using this class – there are easier ways to get the information.