Get-ChildItem -Path $Drives -recurse | Select-String -pattern “domain” | group path | select name | Export-CSV findfiles.csv -notypeinformation
But, I am not getting the desired output.
I am looking for output such a way that, I have two servers names in deploy.csv (server names: 1 & 2).
The path is always going to be c:\test\ and you aren't using $servers. Take everything out after recurse and be sure you're returning stuff before you continue.
You must be logged in to reply to this topic.