Re: Not so Newbie



Hi Richard,
First of all I would like to thank you for answering my question and yes, I
went to check out your website and I think it is very nice of you to make al
those scripts available for free for anybody to take. Yes, this looks like a
very difficult script and certainly not for a beginner like me. I am going to
study it and if you do not mind come back with some more questions. The
reason I asked for this was not to start of with a script like this to learn
but I actually have a need for something like this. I am sitting on a network
wit 35+ computers and to go to each of those computers to individualy install
a program is gruelling. Also I am not the network admin I programmed together
with my boss (1 man business) a business management system for a big company
(and are now providing support) but are sometimes requested with network
admin duties. Once again thanks a stack.

"Richard Mueller [MVP]" wrote:

Manie Verster wrote:

I have programmed in Visual Basic for Applications, VBScript and a little
bit
of JavaScript but have never done server scripts before. I am looking for
a
script to install applications to different computers on a network from my
computer or a server on the same network. But please guys, like I say I
have
never done these kind of scripts before, so can you please explain what
everything means. It will be much appreciated.
Thanks
Manie Verster

This is not an easy task. There are lot of issues to consider. Because it
involves running programs on remote computers, I don't think it is wise to
take shortcuts and skip steps.

This question has come up before and I spent considerable time designing the
scripting solution linked here:

http://www.rlmueller.net/Deploy.htm

If your goal is to learn administrative scripting, maybe this isn't the
project to start with. However, the script includes many comments that
explain each step. In brief the steps are:

1. Discover the DNS and NetBIOS names of the domain.
2. Prompt for the NetBIOS name of a group. The program will deploy to all
computers that are members of this group.
3. Determine Distinguished Name of this group and bind to the group object.
4. Prompt for an executable to run on each remote computer in the group.
5. Prompt for any command line parameters.
6. Setup a log file to document the deployment.
7. Use WMI to bind to the specified executable file.
8. For each computer in the group:
a. Determine the NetBIOS name of the computer.
b. Ping the computer to see if it is available.
c. Connect to the remote computer with WMI.
d. Check if the executable is already running on the remote computer.
e. Map a drive to the root of C: on the remote computer.
f. Copy the executable to the root of C: on the remote computer.
g. Run the executable.
h. Wait for the executable to finish and then delete the executable
file.
i. Remove the drive mapping

Everything is logged, so you know where the deployment failed. You probably
will need to repeat the deployment because of computers offline, but the log
tells you which computers need this. If the executable should not be run
twice on the remote computers, then remove computers where the deployment
was successful from the group.

The ideas for this script came from Microsoft kb article 827227 for
deploying patches:

http://support.microsoft.com/default.aspx?scid=kb;en-us;827227

Most of the techniques are explained in the text "Microsoft Windows 2000
Scripting Guide", which is available online at:

http://www.microsoft.com/technet/scriptcenter/guide/sagsas_overview.mspx?mfr=true

I hope this helps. Of course, other options include SMS and SUS. Also, I
have not yet been able to test deploying to remote Vista clients. Based on
my experience with Vista so far, I would expect the script to fail on Vista
computers.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--



.



Relevant Pages

  • Re: Finding users in local admin groups
    ... > Here is a vbscript that you can run against a remote computer that moves ... > *local* users except 'Administrator) from the Administrators group to the ... You should also add to the script logging to a file of the ... > you moved on what computers. ...
    (microsoft.public.win2000.security)
  • Re: Change local administrator password ? through GPO or push script ?
    ... I would like to change the local administrator password of every computers member of my AD domain but I am not sure of the best method. ... Create a vbs script that points to the local computer and then deploy this script by GPO. ... This attribute will permit to know wich admin password is configured for this machine. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Not so Newbie
    ... The script is designed for situations like yours. ... wit 35+ computers and to go to each of those computers to individualy ... Prompt for an executable to run on each remote computer in the group. ... so you know where the deployment failed. ...
    (microsoft.public.windows.server.scripting)
  • Re: VBscript that restart the domain comptuer
    ... If you have a shutdown script that cleans up the profiles, ... permissions can restart all computers in a list remotely. ... I have already VB script I ...
    (microsoft.public.windows.server.active_directory)
  • Re: fire script in remote servers
    ... and the script hangs there.. ... remote computer does not respond unless you give some details about it, ... not responding to it? ... why is it that some computers don't respond "properly", ...
    (microsoft.public.windows.server.scripting)