Hi all I have my folder structure as follows
D:\Exclude
Include
Include1
Exclude
Include
What I need is I would like to filter the directory Include1\Exclude this is what I tried which is not working
$Path ="D:\Exclude"
$DirList = Get-ChildItem -Path "$Path" -Recurse | where {$_.DirectoryName -ne "D:\Exclude\Include1\Exclude"}
$DirList