Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need scripting help...ASAP

Posted on 2014-07-25
2
Medium Priority
?
334 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
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
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…
Loops Section Overview

886 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