Hi,
Ihave an array like $a = gci and I am passing $a through a foreach statement.
How can I check if the item in the array is a folder, so like
if $item is not a folder then delete. I tried this forst but its not working
remove-item $filepath -force | Where-Object { -not ($_.psiscontainer) }
Alter De Ruine