We help IT Professionals succeed at work.

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

siva k
siva k asked
on
53 Views
Last Modified: 2017-04-07
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.............
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018

Commented:
Question answered.