# Returns information about the COM class component categories found on a computer. # Runs on Windows 7 workstation. Try { $ComponentCategory = get-wmiobject "Win32_ComponentCategory" foreach ($CategoryItem in $ComponentCategory) { write-host write-host "Name is " $CategoryItem.Name write-host "Category Id is " $CategoryItem.CategoryId write-host "Caption is " $CategoryItem.Caption write-host "Path is " $CategoryItem.Path } write-host "Successfully passed" exit 0 } Catch { write-host "Failure" exit 1001 }