PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.win.server.scripting > How to connect to remote server from a machine over the network andquery active directory for groups , users, computers which will be given bythe user
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to connect to remote server from a machine over the network andquery active directory for groups , users, computers which will be given bythe user

Réponse
 
LinkBack Outils de la discussion
Vieux 06/10/2008, 14h50   #1
arun
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to connect to remote server from a machine over the network andquery active directory for groups , users, computers which will be given bythe user

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
  Réponse avec citation
Vieux 07/10/2008, 05h10   #2
Al Dunbar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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@gmail.com> wrote in message
news:71940db8-7f41-4a15-bb82-c836ac1a912c@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

/Al


  Réponse avec citation
Vieux 07/10/2008, 07h43   #3
Al Dunbar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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@hotmail.com.nospaam> wrote in message
news:eLgw0oCKJHA.1156@TK2MSFTNGP05.phx.gbl...
>
> "arun" <arunonw3@gmail.com> wrote in message
> news:71940db8-7f41-4a15-bb82-c836ac1a912c@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
>
>



  Réponse avec citation
Vieux 16/10/2008, 12h50   #4
arun
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to connect to remote server from a machine over the networkand query active directory for groups , users, computers which will be givenby the user

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 if you can?
  Réponse avec citation
Vieux 16/10/2008, 12h52   #5
arun
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to connect to remote server from a machine over the networkand query active directory for groups , users, computers which will be givenby the user

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 if you can?

  Réponse avec citation
Vieux 17/10/2008, 18h34   #6
Al Dunbar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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@gmail.com> wrote in message
news:aff891c4-6b8f-4fd4-8897-0170b7523fcf@k13g2000hse.googlegroups.com...
> 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


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h50.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13596 seconds with 14 queries