Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > 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

Reply
Thread Tools Display Modes

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
Guest
Posts: n/a

 
      10-07-2008

"arun" <> wrote in message
news:71940db8-7f41-4a15-bb82-...
> 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


 
Reply With Quote
 
 
 
 
Al Dunbar
Guest
Posts: n/a

 
      10-07-2008

"Al Dunbar" <> wrote in message
news:...
>
> "arun" <> wrote in message
> news:71940db8-7f41-4a15-bb82-...
>> 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
>
>



 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      10-17-2008

"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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Account Group Membership Visible in Active Directory Users and Computers but not Found in LDAP Query dln Windows Server 3 01-14-2009 07:00 PM
Re: How to grant a domain user account to query Active directory Groups and its Users Paul Williams [MVP] Active Directory 0 11-22-2006 07:01 PM
Re: Remote Control Add-on for Active Directory Users & Computers Paul Bergson [MVP-DS] Active Directory 0 10-16-2006 01:07 PM
Custom Address Lists / Creating an LDAP query in Active Directory Users and Computers Jon Paskett Active Directory 5 02-24-2004 06:53 AM
Custom Address Lists / Creating an LDAP query in Active Directory Users and Computers Jon Paskett Scripting 5 02-24-2004 06:53 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59