If you have problems with the automatic updates system, or want to force machines to update or call back to a WSUS server, you can run the scripts from our Scripts Page remotely. This process uses one of the PS Tools, and allows you to either run the scripts remotely on an individual machine, or across numerous machines.
This procedure uses the command prompt. If you need a getting started to the command prompt then we have one here: https://dosprompt.info/ (new window)
The first thing you will need to do is download PS Tools, which at the time of writing can be found here: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec (new window).
The tool you want from that is psexec. When running the batch file with psexec nothing is seen on the screen of the client, so effectively runs silently.
Setup to run the script
You need to use a server, or other system where you are logged in as a domain admin.
From the tools, put psexec and the batch file that you want to run in the same directory.
If you want to run the script against a series of machines, then you will need to put a text file in the same directory, which contains a list of machines in the format of \\machine name. To create the list based on what machines are live, see below.
Running the Script on the Target Machine
For a single machine, use a command prompt to change to the directory where you have placed psexec and the batch file. The first time the process is run you will get a prompt for the licence agreement, however that will only happen once on the machine that you are running it from (so if you run it elsewhere, the prompt will return).
Where "workstation is the name of the machine that you want to run the script.
On Windows Vista, Windows 7 or Windows 2008, you need to run the command from an elevated command prompt. To open an elevated command prompt right click on Command Prompt shortcut and choose Run As Administrator. Then run the command from there.
Running the Script on Multiple Machines
psexec allows you to feed it a list of machines. The tool will then step through each machine and run the batch file against each one in turn.
For bulk changes where the list of machines is in the format of "\\machinename" :
Getting a List of Machines to use with PSEXEC
To get list of machines that are currently live run the following from a command prompt.
This will give you something like this:
Remove the content that isn't related to the machine name, so the remarks and the command at the end so that you end up with a list like this:
Then save the file as list.txt and put it in the directory with the batch file and psexec file.
Alternative for the "detectnow" command only
For the single command wuauclt /detectnow you can use a single line command:
Top of the Page - Home Page
Last Page Update: 10/06/2021
Copyright Sembee Ltd. 1998 - 2024.
Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions.
All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.
Sembee Ltd. is registered in England and Wales at 1 Carnegie Road, Newbury, Berkshire, RG14 5DJ.
Registered company number: 4704428. VAT Number GB 904 5603 43.
Server 1