functions/Copy-ItemRecursive.ps1

function Copy-ItemRecursive (
[Parameter(Mandatory=$true)]
[string] $SourceDir,
[Parameter(Mandatory=$true)]
[string] $TargetDir,
[switch] $Force,
[string] $Filter,
[string] $Include,
[string] $Exclude
) {
    if (!(test-path $TargetDir)) {
        new-item -ItemType Directory -Path $TargetDir
    }
    Copy-Item -Path $SourceDir\* -Destination $TargetDir -Container -Force:$Force -Recurse `
        -Filter:$Filter -Include:$Include -Exclude:$Exclude -Verbose:$Verbose
}