I need to do a one time update for a file that is used most of the workstations on a network. Basically replace an existing file.
I don't know of a way to do this on certain computers only with GPO.
Does anybody have a script or power shell command that could do this?
Hello Ron,
Do you know the source location and the destination? If so then you can copy that from a logon script. Something like this:
copy \\servername\sharename\filename.txt c:\somelocalfolder\filename.txt /y
That could work! I do know the source and destination locations.
But I was hoping for something like a shingle command that would send it to all of the workstations and only install it on the ones that had the old file.
Alright! We need to make a fancy script. What we can do is define the computername like comp1,comp2 etcetra and then run Foreach do something. Or we can make it even fancier and pull all computers from a certain OU in the AD and run the same command.
There are a few ways to do this. I prefer using the logon script to all another batch file. We have also sent out an email to users with a link in the email to the batch file. It needs to be nothing more than, Click here to run the update."
The DOS command you want to play with is If Exist. You can open and cmd window and type help If to read more. But here are a few examples of how to use it.
Awesome answer Chris!