Link to home
Start Free TrialLog in
Avatar of siva k
siva k

asked on

how to search for a.bak files on all drives on multiple computers

i have 10 computeers and saved .bak files almost in all drives.

i am using below script to find .bak  but not getting the result.

#server.txt contains computer names

$comp=get-content d:servers.txt

foreach($comp in $comp)
{

$k=Get-ChildItem d:\*,c:\* -recurse -include *.bak

$k|select fullname | Export-Csv C:\files.csv -NoTypeInformation
}

please help me.............
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oBdA
oBdA

Question answered.