"arun" <> wrote in message
news:aff891c4-6b8f-4fd4-8897-...
> Thanks Al Dunbar,
>
> What I was trying to do was as follows.
>
>
> There is a machine win2003, and clients. I want to access the active
> directory running on the server from any of the client and delete
> users, computers etc.
>
>
> So I am able to connect by the following code. This will create an OU
> on the domain.
>
>
> Set objDomain = GetObject("LDAP://dc=*,dc=*")
> Set objOU = objDomain.Create("organizationalUnit", "ou=*")
> objOU.SetInfo
>
>
> As of now fine. Suppose this script is example.vbs. I have logged
> into
> the local machine (client) as a normal user with less prvileges. So
> when I run this script on the remote server
You are not running this script on the remote server, you are running it on
the computer that you are logged into. The script, in turn, is making
changes to your Active Directory, which exists on the domain controller(s)
in your network.
> win 2003 from a client, I
> want to use
> something like "RunAs" etc. If I use run as it is not showing me what
> happened . It just runs, opens and closes one cmd window. And the
> operation also not done.
How are you running the script when it works for you? Have you changed the
default scripting engine from wscript to cscript? If so, have you done this
under the profiles of the privileged account you are using?
If you want to see the output of the script, I'd suggest that you run a
batch script via runas that looks something like this:
@echo off
cscript.exe //nologo example.vbs
pause
/Al
|