Solved

I'd like to use pstools to copy a .lnk file from a network share to a local folder on each workstation's desktop.

Posted on 2016-08-23
6
62 Views
Last Modified: 2016-08-23
Having some difficulty with the syntax/understanding what exactly i'm trying to accomplish.

psexec -s \\hostname-pc COPY \\server\share\file.lnk ????C:/?  I'm not sure how to "phrase" the destination.  

Since the initial command of "psexec -s \\hostname-pc . . ." runs the command from THAT hostname-pc right?  So do I have to use a "shared" folder on the workstation to copy this file to?  Or since i'm running the command from that workstation can I use any filepath?  

Synopsis:
I have a .lnk(shortcut) file that runs system restore and creates a manual restore point.  I'd like to push this file to my desktop users local machines so the shortcut could be run at anytime.  Well over 100 workstations to copy this file to so using psexec or something similar would be awesome.
0
Comment
Question by:Daniel Checksum
  • 3
  • 3
6 Comments
 
LVL 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 41767239
To copy to all stations in the domain...
psexec \\* -s -c cmd /c COPY \\server\share\file.lnk c:\

Open in new window


To copy to certain stations in the domain...

- Make a .txt file containing the destination host names, one name per line. E.g. Names.txt
Host1
Host2

Open in new window


psexec @names.txt -s -c cmd /c COPY \\server\share\file.lnk c:\

Open in new window

0
 
LVL 1

Author Comment

by:Daniel Checksum
ID: 41767247
So I would be able to write directly to root C:\?   Or would I have to choose like C:\%userprofile%\Documents ?  

That is where my confusion lies, on the destination end of the copy command.  I appreciate your clear and concise suggestion though.
0
 
LVL 24

Assisted Solution

by:NVIT
NVIT earned 500 total points
ID: 41767249
That complicates things. You'll need each user name to feed into it.

I think you can use the public folder since all/most use the same path.

Or use a gpo/gpp instead of psexec
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 1

Author Comment

by:Daniel Checksum
ID: 41767252
If domain admins have local access to each workstation(which should be already configured) then I should be able to use our domain Administrator account on each workstation right?  My ex-boss also recommended using the Public folders.
0
 
LVL 24

Assisted Solution

by:NVIT
NVIT earned 500 total points
ID: 41767260
As long as its the same on all stations, it should work.
E.g. C:\users\adminname\Documents
1
 
LVL 1

Author Closing Comment

by:Daniel Checksum
ID: 41767263
Thanks for all your help, NVIT.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

772 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