RE: Connecting to remote servers with scripting object

From: Mike Pietsch (Pietsch_at_discussions.microsoft.com)
Date: 02/11/05


Date: Fri, 11 Feb 2005 10:51:07 -0800

Paul,

You are doing exactly what I want to do, but any script I make spews an
error that says:
C:\Scripts\listvpc.vbs(5, 1) Microsoft VBScript runtime error: ActiveX
component
 can't create object: 'VirtualServer.Application'

What exactly is MyServer ?

Mike

"Paul Knight" wrote:

> Thanks for the advice Jrex7. It wasn't quite what I was after but was
> interesting all the same.
>
> I found the answer to my problem elsewhere, it was simply a case of adding
> the remote server name to the end of the CreateObject call, like this:
>
> Set objVS = CreateObject("VirtualServer.Application", MyServer)
>
> Cheers,
> Paul
>
>
> "Jrex7" wrote:
>
> > Here's some info:
> >
> > I recommend you download and learn WSH from here
> > http://www.microsoft.com/downloads/details.aspx?FamilyID=c717d943-7e4b-4622-86eb-95a22b832caa&DisplayLang=en
> >
> >
> > Prerequisite to running remote scripts.
> >
> > Remote WSH, which is a new technology included in WSH 5.6, provides the
> > ability to run a script on a remote machine or machines. With Remote WSH, the
> > script is physically copied from the local machine to the remote machine
> > before executing. In order to enable Remote WSH functionality, you must first
> > set up the remote machine with the proper security settings. The steps below
> > perform the tasks that enable Remote WSH.
> >
> > Note Both the remote and local machines must be running Windows NT 4 SP3
> > or greater in order to use Remote WSH.
> > To enable a machine to run remote scripts
> >
> > Install WSH V5.6 on the machine. If you are using Windows 2001 or have
> > installed Internet Explorer 6 or greater, WSH 5.6 has already been installed.
> > Note WSH 5.6 is available for download from the web at
> > http://msdn.microsoft.com/scripting
> > Add yourself to the remote machine's Local Administrators group.
> > To enable Remote WSH, use Poledit.exe on the server.
> > Note An administrator who wants to enable Remote WSH must either acquire
> > the Windows 2000 resource kit, or use http://msdn.microsoft.com/scripting to
> > acquire the necessary windowsscript.adm file that contains the WSH settings.
> > The windowsscript.adm file must be copied to the server that sets the
> > gapplicabel group's policies. Although it is not necessary to copy the file
> > to the server's \WINNT\INF directory, this is nonetheless where the default
> > adm files are located.
> > Note For more information on Poledit.exe, see the Poledit.exe's online
> > help system.
> > WSH should now be enabled on the machine. To test it, see Running Scripts
> > ************************************************
> > WSH 5.6 can run scripts that reside on remote systems. The following scripts
> > demonstrate this capability. These scripts make the assumption that the files
> > are located on a local machine directory called "c:\wsh5.6"; change the local
> > path and the remote machine name as necessary.
> >
> > After initially running RemoteTest.WSF on the local machine, there may be a
> > small pause as DCOM verifies your identity. After you see the "Done" message,
> > a file named "c:\beenhere.txt" on the remote machine indicates the time that
> > you executed the command (from the remote computer's clock).
> >
> > ' VBScript.
> > RemoteTest.WSF
> > -------------------------------
> > <package>
> > <job>
> > <script language="VBScript">
> > set oController = CreateObject("WSHController")
> > set oProcess = oController.CreateScript("c:\wsh5.6\beenhere.wsf",
> > "remmachine")
> > oProcess.Execute
> > While oProcess.Status <> 2
> > WScript.Sleep 100
> > WEnd
> > WScript.Echo "Done"
> > </script>
> > </job>
> > </package>
> > -------------------------------
> >
> > BeenHere.WSF
> > -------------------------------
> > <package>
> > <job>
> > <script language="VBScript">
> > set fso = CreateObject("Scripting.FileSystemObject")
> > set fout = fso.CreateTextFile("c:\beenhere.txt", true)
> > fout.WriteLine Now
> > fout.Close
> > </script>
> > </job>
> > </package>
> >
> >
> > "Paul Knight" wrote:
> >
> > > Does anyone know if it is possible (and if so how) to connect to a remote
> > > Virtual Server via the scripting interface. I use some scripts to manage
> > > several Virtual Servers but all the scripts seem to need to run locally to
> > > each server. I'd like to put together a web page to pull together the status
> > > of several servers and their VMs but I can't find a way to connect from one
> > > server to another.
> > >



Relevant Pages

  • RE: Connecting to remote servers with scripting object
    ... > Prerequisite to running remote scripts. ... > Remote WSH, which is a new technology included in WSH 5.6, provides the ... use Poledit.exe on the server. ...
    (microsoft.public.windows.server.scripting)
  • Re: Remote Computers / Users and Scripts
    ... My remote users connect to my Domain via windows 2003 RAS VPN. ... When they first turn on the computer there are Group Policy scripts bound to ... Some times these startup scripts run for a very long time, ...
    (microsoft.public.windows.server.active_directory)
  • Regarding a selection for mobile code/scripting language
    ... reasonably efficient robustness for administration and security functions. ... of the framework completed as described in my "Treatise on Informational ... Fun stuff like remote registry control, remote program execution, ... I want to have lots of mobile scripts that perform generalized ...
    (Vuln-Dev)
  • RE: Connecting to remote servers with scripting object
    ... Prerequisite to running remote scripts. ... Remote WSH, which is a new technology included in WSH 5.6, provides the ... use Poledit.exe on the server. ...
    (microsoft.public.windows.server.scripting)
  • Re: Logon Scripts Acrossed VPN
    ... Scripts are one of those policies that don't process if a GP slow link is detected, so that may be what's happening for your remote sites. ... You can override this behavior by enabling the policy for those remote computers under Computer Configuration\Admin. ...
    (microsoft.public.windows.group_policy)