So here it is. Say you have a folder full of zip files at j:\stuff. Running this script (with j:\stuff as the current location) will unzip the contents of those zip files to j:\stuff.
$shell=new-object -com shell.application
$CurrentLocation=get-location
$CurrentPath=$CurrentLocation.path
$Location=$shell.namespace($CurrentPath)
$ZipFiles = get-childitem *.zip
$ZipFiles.count | out-default
foreach ($ZipFile in $ZipFiles)
{
$ZipFile.fullname | out-default
$ZipFolder = $shell.namespace($ZipFile.fullname)
$Location.Copyhere($ZipFolder.items())
}
If you also want to delete the source zip files, you can add remove-item $ZipFile after the line beginning $Location.Copyhere. The reason I didn’t include that in the sample above is I strongly advise you (see my usual disclaimer) to run the script and make sure you’re satisfied the zip files unzipped properly before you go letting it delete anything!
Enjoy.