PowerShell 2 - Interrogate .wsp files to report to csv, names of included dlls


hi,

i have requirement interrogate number of wsp files, each of contains number of dlls , other file types. need able output csv file, wsp file name, , included dll file names; not interested in other file types. there several wsp files - in same folder, thinking of looping through wsp files don't know how or report out dll names, being newby powershell.

manually - have change extension wsp cab expand cab , extract dll files, , copy , paste wsp file name , dll file name excel bit of pain number of wsps & dlls have deal with. there must smarter way of doing powershell.

thanks in anticipation.


get-childitem c:\wsp\* -include *.wsp,*.cab | rename-item -newname {$_.basename+".cab"} -passthru | foreach { 		$files = (expand -d ($_.fullname)) -match "dll$" | foreach {($_ -split ": ")[1]} 		new-object psobject -property @{ 			cabname = $_.basename 			dllnames = $files -join ";" 		} 	} | export-csv c:\result.csv -notypeinformation



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...