PowerShell Vérifiez si Chiltem est répertoire

Get-ChildItem -Recurse -Path $pathSource | % {
    if ($_.PSIsContainer) {
        Write-Output "This is a directory, skip it"
    } else {
    	Write-Output "Do stuff"
    }
}
Michu44