script

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

is there anyway to write a vbscript query to search ad and show up just user
and computer names?

thanks
 
wtk said:
Hi,

is there anyway to write a vbscript query to search ad and show up just
user
and computer names?

Sure. There are actually a bunch of ways and surely
someone will post a specific script (or link) but you
might find this helps you even more in the long run:

On the Microsoft website there is a large scripting
resource, including what they call the "Script-o-Matic"
(no kidding) for both regular admin issues AND another
for AD.

Try this Google search:

[ adsi "Script-o-Matic" site:microsoft.com ]
 
Herb,

thanks.

I have tough time to get username and computer name together. I can get
them seperately easy. do you have any scripts in mind can do both?

thanks

--
007


Herb Martin said:
wtk said:
Hi,

is there anyway to write a vbscript query to search ad and show up just
user
and computer names?

Sure. There are actually a bunch of ways and surely
someone will post a specific script (or link) but you
might find this helps you even more in the long run:

On the Microsoft website there is a large scripting
resource, including what they call the "Script-o-Matic"
(no kidding) for both regular admin issues AND another
for AD.

Try this Google search:

[ adsi "Script-o-Matic" site:microsoft.com ]


--
Herb Martin, MCSE, MVP
Accelerated MCSE
http://www.LearnQuick.Com
[phone number on web site]
 
WTK,

Ahh, you mean you want a list of computers with their associated users?
(or users with their associated computers? )

Yes that's more difficult. AD doesn't make that association for you.
But it's not hard to do either.

In my Directory our users have an employee ID. Periodically, the user
is required to fill out a "registration" during logon. All this
registration does is place the EmployeeID of the user in the EmployeeID
attribute of the computer object, and the Displayname in description
attribute of the computername.

I wrote a simple hta to do the registration because we have some
one-to-many issues to deal with. However, if you are strictly a
one-to-one shop (one user -always- logs on to the same machine) I
suppose you could just drop in the logon script so it requires no user
intervention.

Once the user's displayname is in the description field, all you need
to do is dump a list of computers w/descriptions to get the list you're
looking for. It also makes using ADUC and like tools easier to use as
you can now quickly view/or search for computers by user.

To do this, you'll need to run the delegation wizard to allow users to
update the required properties on computer objects.

Hope it helps.
Tim.Olsen
 
wtk said:
Herb,

thanks.

I have tough time to get username and computer name together. I can get
them seperately easy. do you have any scripts in mind can do both?

If you mean you want a list of Users with "their computer"
names then in some sense that doesn't even exist.

Such is merely a HUMAN concept, not enforce nor
maintained by AD in any significant sense.

A user can be logged on from multiple machines at the
same time, not logged on at all, or can logon to different
machines on subsequent days etc....

Tim (elsewhere this thread) has some ideas.

You might find that you are actually even better off looking
in WINS Server for such information IF you run NetBIOS
and WINS Server (as is likely if you have a significant number
of users) AND you use the Messenger service which many
people are disabling.

Looking in WINS can show all "registered names" and with
a bit of parsing User names, Computers names, and associated
IPs might be extracted.

You probably should state your EXACT GOAL explicitly,
and not what you think you want to do to accomplish that.

There are a LOT of smart people that know ways to get to
information and things that might not be obvious if you
state you final goal first.
 
Back
Top