inline - List 3rd party drivers thru Powershell 3.0 -
i trying list of 3rd party drivers installed on windows 8 machine.
gwmi win32_systemdriver| ? ((get-itemproperty $psitem.pathname).versioninfo).companyname -notlike *microsoft*
error : get-itemproperty : cannot bind argument parameter 'path' because null.
is there one-liner way getting around problem.
answer moved comment discussion on question:
say want show status, state, name , companyname properties each of found items, following:
gwmi win32_systemdriver | select *, @{ n='companyname';e={ (get-itemproperty $_.pathname -erroraction ignore).versioninfo.companyname }} | companyname -notlike "*microsoft*" | sort state | ft status, state, name, exitcode, companyname.
Comments
Post a Comment