Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
GetObject error for newbie
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David  
View profile  
 More options Nov 3 2009, 5:58 pm
Newsgroups: microsoft.public.scripting.wsh
From: David <Da...@discussions.microsoft.com>
Date: Tue, 3 Nov 2009 09:58:10 -0800
Local: Tues, Nov 3 2009 5:58 pm
Subject: GetObject error for newbie
I am just starting to work with windows scripting and ADSI, and trying some
of the examples found in the TechNet doucumentation.

Here is my script:
Set objUser = GetObject("LDAP://cn=david,dc=ectax,dc=escambia")
ectax.escambia the domain and david being a user account in the AD.

and error:
getdomainuser.vbs(1, 1) (null): There is no such object on the server.

The sample code in the doc also includes an OU parameter. in our case there
are no OU's under the domain so that was left out of my getobject statement.

I can remove the cn parameter and the object for the domain is created with
no errors.

thanks for any help
David


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jonny  
View profile  
 More options Nov 15 2009, 9:05 am
Newsgroups: microsoft.public.scripting.wsh
From: "jonny" <jo...@what.com>
Date: Sun, 15 Nov 2009 04:05:51 -0500
Local: Sun, Nov 15 2009 9:05 am
Subject: Re: GetObject error for newbie
Hi David,

Basics are : Have you installed that stuff?
If you have. Post some easy success.
--------------------------------------------------------
Then ask a aquestion .
--------------------------------------------------------

You sound like when the coffee machine,
creamer, spoon, cup, partience, time, room in
your trash can, electricity, and propery tax
to run it, came with FOX TV, Obama Ethics,
and what else your mind escaped to become question.

Be valid. Be a questioner.

wsh is the strongest 2 bill+ audience there is on the planet.

FOR ALONG TIME.

"David" <Da...@discussions.microsoft.com> wrote in message

news:BF6C0A3F-3AD6-43E7-AFB7-DDEDCADE491C@microsoft.com...


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Mueller [MVP]  
View profile  
 More options Nov 15 2009, 4:40 pm
Newsgroups: microsoft.public.scripting.wsh
From: "Richard Mueller [MVP]" <rlmueller-nos...@ameritech.nospam.net>
Date: Sun, 15 Nov 2009 10:40:07 -0600
Local: Sun, Nov 15 2009 4:40 pm
Subject: Re: GetObject error for newbie

You need to find the correct binding string to bind to the user object. The
binding string you used above assumes that the object with Common Name
"david" is in the root of the domain ectax.escambia, which is not likely. If
you have no Organizational Units, then most likely your user objects are in
the default container, "cn=Users". You might try:

Set objUser = GetObject("LDAP://cn=david,cn=users,dc=ectax,dc=escambia")

It is also possible that "david" is the "pre-Windows 2000 logon" name of the
user, but the Common Name is something else. To get used to the
Distinguished Names in your domain it might help to run a script that dumps
out the names of all user's. The binding string you need to bind to the user
object is the Distinguished Name, plus the moniker "LDAP://". For example,
if all of your users are in the "cn=Users" container, you could run the
following (at a command prompt):
=======
' Bind to cn=Users container.
Set objContainer = GetObject("LDAP://cn=Users,dc=ectax,dc=escambia")

' Filter on user objects.
objContainer.Filter = Array("user")

' Enumerate all user objects in the container.
For Each objUser In objContainer
    Wscript.Echo objUser.distingishedName
Next
====
Or, if you have OU's and containers you can run a VBScript program that uses
ADO to query for all users and output their Distinguished Names. The example
linked below creates a text file with the Distinguished Names of all users
in the domain:

http://www.rlmueller.net/Create%20User%20List%202.htm

You pass the name of the file as a parameter to the program and it creates
the file with the names. Alternatively, if you have a Domain Controller with
Windows Server 2003 or above, you can use the dsquery utility to dump out
the Distinguished Names of all users. At a command prompt on the DC use:

dsquery user

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google