![]() Clear it out and proceed with logging.`n" -ForegroundColor Green Write-Host "WMI Class $CustomWMIClassName exists. Write-Host "Could not create WMI class" -ForegroundColor Red $newClass = New-Object ("root\cimv2", ::Empty, $null) ![]() Try to create it.`n" -ForegroundColor Green Write-Host "WMI Class $CustomWMIClassName does not exist. # If the GET failed, the class doesn't exist, so create it. Get-WMIObject $CustomWMIClassName -ErrorAction Silentlåontinue -ErrorVariable strWMIClassError | Out-Null # Note that, once the class has been created on a device, it must be manually deleted if you want to add any additional columns of data # Function to create the custom WMI class # ***** THE MAIN SCRIPT STARTS HERE - NO MODIFICATION SHOULD BE NECESSARY ***** $strCommonExtensions = $strCommonGoogleExtensions + $strCommonMozillaExtensions + $strCommonEdgeExtensions + $strCommon3rdPartyExtensions #Combine the excluded extension lists for use later ![]() If you want to inventory them, set this to $true, otherwise they will be skipped $boolInventoryPreinstalledMicrosoftApps = $false # there are hundreds of preinstalled Apps from Microsoft. $strCommon3rdPartyExtensions = 'Adobe Acrobat' $strCommonGoogleExtensions = 'Google Docs','Google Sheets','Google Slides','Google Drive','YouTube','Gmail','Google Docs Offline','Chrome Web Store Payments','Chrome Media Router' $boolExcludeCommonExtensions = $true #optional, if you want to exclude the following common browser extensions (these are typically preinstalled or mass installed) $CustomWMIClassName = "cm_BrowserExtensionsV1" $strEdgeProfilePath = "$env:ProgramFiles\WindowsApps" $strMozillaProfilePathAppend = "AppData\Roaming\Mozilla\FireFox\Profiles" $strChromeProfilePathAppend = "AppData\Local\Google\Chrome\User Data\Default\Extensions" Comment this line to show standard error messgaes. ![]() $ErrorActionPreference = "Silentlåontinue" # Override the default to hide errors. Start-Transcript -Path "$env:SystemRoot\Temp\BrowserInventory.log" # The script queries the selected profile paths to find installed browser extensions and write them into a custom WMI class to be picked up by ConfigMgr Hardware Inventory A bit and found this one, it lists it so much better :) It does however also show installed software and you have to trim it a bit to adjust it to your needs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |