Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user

HTVi
TV Discussion Newsgroups

How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user
arun <arunonw3[ at ]gmail.com> 10/6/2008 12:50:00 PM
How to connect to remote server from a machine over the network and
query active directory for groups , users, computers which will be
given by the user
Re: How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 10/7/2008 3:10:05 AM

"arun" <arunonw3[ at ]gmail.com> wrote in message
news:71940db8-7f41-4a15-bb82-c836ac1a912c[ at ]v53g2000hsa.googlegroups.com...
[Quoted Text]
> How to connect to remote server from a machine over the network and
> query active directory for groups , users, computers which will be
> given by the user

That is a somewhat vague specification, so if I give you this answer:

no need to specify a remote server, just get the information from any DC
with batch code something like this:

net user /domain username
net group /domain groupname
net computer /domain computername

/Al


Re: How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 10/7/2008 5:43:13 AM

"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> wrote in message
news:eLgw0oCKJHA.1156[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
>
> "arun" <arunonw3[ at ]gmail.com> wrote in message
> news:71940db8-7f41-4a15-bb82-c836ac1a912c[ at ]v53g2000hsa.googlegroups.com...
>> How to connect to remote server from a machine over the network and
>> query active directory for groups , users, computers which will be
>> given by the user
>
> That is a somewhat vague specification, so if I give you this answer:
>
> no need to specify a remote server, just get the information from any DC
> with batch code something like this:
>
> net user /domain username
> net group /domain groupname
> net computer /domain computername

< sorry, I posted before I finished by adding this: >

would that suffice, or would you fill in more detail that I was unable to
deduce from your question?

> /Al
>
>


Re: How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user
arun <arunonw3[ at ]gmail.com> 10/16/2008 10:50:25 AM
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 it.

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 win 2003, 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.

Please help if you can?
Re: How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user
arun <arunonw3[ at ]gmail.com> 10/16/2008 10:52:41 AM
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 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.


Please help if you can?

Re: How to connect to remote server from a machine over the network and query active directory for groups , users, computers which will be given by the user
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 10/17/2008 4:34:31 PM

"arun" <arunonw3[ at ]gmail.com> wrote in message
news:aff891c4-6b8f-4fd4-8897-0170b7523fcf[ at ]k13g2000hse.googlegroups.com...
[Quoted Text]
> 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:

[ at ]echo off
cscript.exe //nologo example.vbs
pause

/Al


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen