Created
February 20, 2022 10:49
-
-
Save jazzbanzai/36f81008429724134b2a39fe72b3e521 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#REF1: https://www.dell.com/support/kbdoc/en-in/000126566/windows-how-to-identify-your-dell-docking-station-using-powershell | |
Set-Location -Path C:\temp | |
$dellcabURL = 'https://downloads.dell.com/catalog/DellSDPCatalogPC.cab' | |
$fileName = $dellcabURL.Substring($dellcabURL.LastIndexOf('/') + 1) | |
#Download Dell Cab | |
Invoke-WebRequest -URI $dellcabURL -UseBasicParsing -OutFile "c:\temp\$fileName" | |
#Extact DellSDPCatalogPC.xml | |
& extrac32.exe "c:\temp\$fileName" DellSDPCatalogPC.xml /Y | |
#find the line (would be beettr ro pharse the XML) | |
$MSIregex = 'https:\/\/.*DSIA.*.msi' | |
$DellMSI = Get-Content -Path "c:\temp\DellSDPCatalogPC.xml" | Select-String -pattern $MSIregex | foreach {$_.Matches.Value} | |
#Download install the Dell-MSI (dell client system inventory agent) | |
$fileName = $DellMSI.Substring($DellMSI.LastIndexOf('/') + 1) | |
Invoke-WebRequest -Uri $DellMSI -UseBasicParsing -OutFile "c:\temp\$fileName" | |
Start-Process msiexec.exe -Wait -ArgumentList "/i `"C:\temp\$fileName`" /qn /l*v `"C:\temp\$fileName.log`" " | |
#get inventory +dock | |
gwmi -n root\dell\sysinv dell_softwareidentity | select * | where elementname -like "*WD*" |
Note that if the device that is using the Dock isn't Dell, the MSI package refuses to install. (We have MS Surface using Dell docks)
Well, this would make sense, given that the class required to access the dock information would be reaching into Dell platform specific hooks. Something the surfaces wouldn't have, as not having been manufactured by Dell...
For it to work on non-Dell devices, it would probably require more requirements not already installed, likely Dell bloatware to some capacity.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that if the device that is using the Dock isn't Dell, the MSI package refuses to install. (We have MS Surface using Dell docks)