Read a file add to load testing file

I used this script to read a few months worth of my IIS logs to create a single log file.  I used the single file for load testing with Web Application Stress tool. 

$a = gci -Path C:inetpubiislogs3.comwwwlogstest -Filter *.log

foreach($file in $a)
{
             Write-Host “Processing – $file”
             $a = gc $file.FullName
             Add-Content -Path c:temploadtest.log -Value $a

}

Cheers,

Steve

Unzip several files with PowerShell

Here is a function I used to unzip several files using PowerShell. 

function UnZipMe($zipfilename,$destination)
{
   $shellApplication = new-object -com shell.application
   $zipPackage = $shellApplication.NameSpace($zipfilename)
   $destinationFolder = $shellApplication.NameSpace($destination)

# CopyHere vOptions Flag # 4 – Do not display a progress dialog box.
# 16 – Respond with “Yes to All” for any dialog box that is displayed.

$destinationFolder.CopyHere($zipPackage.Items(),20)
}

$a = gci -Path C:inetpubiislogs3.comwwwlogs -Filter *.zip

foreach($file in $a)
{
    Write-Host “Processing – $file” UnZipMe –zipfilename
    $file.FullName -destination $file.DirectoryName
}