Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a list of 150 computers on my Windows Active Directory network that I am trying to copy a files to. I wonder if someone might have a script that would, copy the files or shortcut to the computers by looking for the PC names in a text file.

share|improve this question

closed as too localized by Brent Pabst, Scott Pack, Lucas Kauffman, HopelessN00b, mailq Oct 2 '12 at 0:50

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Why wouldn't you do this with a group policy? –  Zoredache Sep 28 '12 at 18:32
    
This would be pretty easy to do with PowerShell and not that complex. Are you not familiar with desktop/management scripting? –  Brent Pabst Sep 28 '12 at 18:33

1 Answer 1

The right™ way to do this is to use a startup/logon script in GPO
or
Use a Group Policy File/Shortcut Preference item if your clients are Vista/7 or XP w/ the GPP Extensions add-on.

The reason that you don't want to do this the way that you proposed is that if a computer is not on or is unavailable or has a file locked, this won't work. A logon script or GPO gets around this restriction and guarantees that computers in your organization are compliant.


If you really want to use a script for this and feed it names, I recommend PowerShell. You can use Get-Content to read the list and pipe it to a ForEach-Object that will then contain a Copy-Item command with a destination of \\$_\C$\Path\To\Copy\To.

If you want more info on any of these cmdlets, just run Get-Help *command* -full. For example, if you wanted the full details w/ examples of how Copy-Item works, just run Get-Help Copy-Item -full.

share|improve this answer
    
s/logon/computer\ startup/, depending upon where the file needs to be placed of course. –  Bryan Sep 28 '12 at 18:56
    
@Bryan I don't know what you're talking about ;-) –  MDMarra Sep 28 '12 at 19:01
    
i really dont want to user GPO to get this done i pretty do all my deployment using KACE. i already have a batch file to get this done i used to write VBS script. just checking if anyone already have a script they would be willing to share but thanks for the information guys –  Alex Alexander Sep 28 '12 at 20:48
    
So, if you already use KACE for config management why aren't you using KACE for this? Also, GPO and config management tools like KACE are complimentary technology. Many large scale deployments leverage both technologies to keep their environment in good shape. –  MDMarra Sep 28 '12 at 20:54
    
i am using kace to deploy a the batch files –  Alex Alexander Sep 28 '12 at 21:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.