Solved

Need scripting help...ASAP

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now