Solved

Need scripting help...ASAP

Posted on 2014-07-25
2
315 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

IoT Devices - Fast, Cheap or Secure…Pick Two

The IoT market is growing at a rapid pace and manufacturers are under pressure to quickly provide new products. Can you be sure that your devices do what they're supposed to do, while still being secure?

Question has a verified solution.

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

This article will help you understand what HashTables are and how to use them in PowerShell.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

617 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