I am writing a PowerShell script to get all the items in a particular folder path specified. I am using following command :
$fileName= Get-ChildItem -Path "C:\Path\to\Bin" -Force -Include User.Base.Tests.*.dll
I am not using -Recurse
but it is returning empty results. I want result from only Bin
folder not from sub folder. If I user -Recurse
command it will give me results from sub folders as well which I don't want.
What am I missing here?