Solved

Need scripting help...ASAP

Posted on 2014-07-25
2
310 Views
Last Modified: 2014-07-25
Hello everyone, I am very inexperienced with powershell (but I LOVE it).  I have a txt filled with file names that i want to search a network drive for.  I also would love it to output a list of files that it finds on the network to a txt/csv to show a user how many files from their local computer are actually saved to the network.  I need to run it tonight, so I don't have time to fiddle with it to get it working.  I'm sure its a pretty easy one.  Can anyone lend me a hand?
0
Comment
Question by:r-dechristie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40220777
If I understand your requirement correctly then following code should work for you.. Replace \\Server\share with your share name and C:\Filenames.txt with your file with file names to search..
GCI \\Server\share -Include (GC C:\Filenames.txt) -Recurse | Select Fullname,LastWriteTime,Length,Name | Export-Csv C:\report.csv -nti

Open in new window

0
 

Author Comment

by:r-dechristie
ID: 40220789
Perfect!  Thanks so much.  I really need to find time to learn this great great tool!
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
This article will help you understand what HashTables are and how to use them in PowerShell.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question