Forum Discussion
PS1Exprt_IMHD
Jan 17, 2021Copper Contributor
uniqe value
how can i have uniqe return for below code, i need the true value onlye $Folder = Get-ChildItem -Path C:\10 -Directory | % {$_.Name -eq 'Test'} foreach($Folders in $Folder) { $Folders } current...
farismalaeb
Jan 17, 2021Iron Contributor
Hi
you can use
$Folders | where {$_ -like $true}in the foreach block instead of only $Folders.
---------------
if you find this answer helpful, please click on Best response and give like 🙂