Home All Groups Group Topic Archive Search About


Author
17 Mar 2007 5:00 PM
Miztiik
i have 11 Servers.
Server1 to server10 are standalone servers
Server0 can connect to all these 10 servers.[more like a domain controller]

i want my script to be in Server0 and it has to connect to each server [same
uid and pass for all servers] and run the script and put the output in a text
file and store it in server0.

now i have worked a script which works on a stand alone machine and outputs
the file.

I need to know how to make the script

login-->run the script-->output/save File-->Logout.

Do this for all the servers listed in a text file.

Author
19 Mar 2007 6:30 AM
bg
On Mar 17, 12:00 pm, Miztiik <Mizt***@discussions.microsoft.com>
wrote:
Show quote
> i have 11 Servers.
> Server1 to server10 are standalone servers
> Server0 can connect to all these 10 servers.[more like a domain controller]
>
> i want my script to be in Server0 and it has to connect to each server [same
> uid and pass for all servers] and run the script and put the output in a text
> file and store it in server0.
>
> now i have worked a script which works on a stand alone machine and outputs
> the file.
>
> I need to know how to make the script
>
> login-->run the script-->output/save File-->Logout.
>
> Do this for all the servers listed in a text file.

You can either use psexec.exe or the Create method in WMI's
Win32_Process class to remotely execute the script.  You could modify
the script on the remote server to write the output file directly to
server0.
Author
19 Mar 2007 10:18 AM
Miztiik
can this tool run a process in all the servers simultanaously?
and
how to modify the script source to save the files to server 0
Author
19 Mar 2007 3:23 PM
ThatsIT.net.au
"Miztiik" <Mizt***@discussions.microsoft.com> wrote in message
news:5CA46375-2D61-41B2-967E-4BD2D7F28C6F@microsoft.com...
> can this tool run a process in all the servers simultanaously?
> and
> how to modify the script source to save the files to server 0

what is the output?

most things can be obtained with WMI

thuis script gets a list of computers and get the name of the videocard
drivers on each machine, then writes then to a text file, this script uses
the WMI object Win32_VideoController, there are hundreds more WMI objects
that can find out almoslet all you neeed to know

on error resume next
Dim fso:Set fso = CreateObject("Scripting.FileSystemObject")

dim computers:computers = Array("slim","hank","loretta")


dim videoCards:set videoCards = fso.CreateTextFile("videoCards.txt",true)

dim strComputer,vCards

for each strComputer in computers
Set oWMI = GetObject("winmgmts:" & _
  "{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2")
Set vCards = oWMI.ExecQuery("Select * from Win32_VideoController")
For Each thing in vCards
     dString = strComputer & vbTab & thing.Name
     WScript.Echo dString
     videoCards.WriteLine dString
Next

next


videoCards.close
Author
19 Mar 2007 4:51 PM
bg
Show quote
On Mar 19, 8:23 am, "ThatsIT.net.au" <me@thatsit> wrote:
> "Miztiik" <Mizt***@discussions.microsoft.com> wrote in message
>
> news:5CA46375-2D61-41B2-967E-4BD2D7F28C6F@microsoft.com...
>
> > can this tool run a process in all the servers simultanaously?
> > and
> > how to modify the script source to save the files to server 0
>
> what is the output?
>
> most things can be obtained with WMI
>
> thuis script gets a list of computers and get the name of the videocard
> drivers on each machine, then writes then to a text file, this script uses
> the WMI object Win32_VideoController, there are hundreds more WMI objects
> that can find out almoslet all you neeed to know
>
> on error resume next
> Dim fso:Set fso = CreateObject("Scripting.FileSystemObject")
>
> dim computers:computers = Array("slim","hank","loretta")
>
> dim videoCards:set videoCards = fso.CreateTextFile("videoCards.txt",true)
>
> dim strComputer,vCards
>
> for each strComputer in computers
>  Set oWMI = GetObject("winmgmts:" & _
>   "{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2")
>  Set vCards = oWMI.ExecQuery("Select * from Win32_VideoController")
>  For Each thing in vCards
>      dString = strComputer & vbTab & thing.Name
>      WScript.Echo dString
>      videoCards.WriteLine dString
>  Next
>
> next
>
> videoCards.close

Question:
> can this tool run a process in all the servers simultanaously?

Answer:
Yes, you can just use a for loop to call it for each server.
Author
25 Apr 2007 4:46 AM
Miztiik
but each server requires authentication to get connected to the server and
to run the script
so how will i authenticate to the server from within the script?[assuming i
have one user uid and pass configured in all comps especially for this
purpose]
Author
3 May 2007 3:31 PM
h3ll b0I
*bump*

needs some help on this

AddThis Social Bookmark Button