Re: Books/References new to scripting in AD/2003



Thanks Richard. I will check out that book and the links.

Here is the part of the script where it is pulling the info from AD.

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 100
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.CommandText = _
"SELECT givenName, SN, description, telephoneNumber FROM " _
& "'LDAP://dc=mops-ohio,dc=local' WHERE " _
& "objectCategory='user' and telephonenumber > 1"
Set objRecordSet = objCommand.Execute

I will read up on your site to change things around as needed. I just
want/need something that for now I can create and pretty up to be printed
out and left in our mail room. Eventually I will have this online for users
to view and print if they want based on sorting criteria.

Thanks.

Tim


"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:uwDzBsptIHA.2292@xxxxxxxxxxxxxxxxxxxxxxx
Timothy Parker wrote:

Hello, I am new to the scripting world in an AD environment. I have done
some stuff relating to web servers/e-commerce. I am now in charge of a
50+ user network and all its components. I am working on
cleaning/updating and organizing AD a bit and am looking to be able to
pull some reports out of this data for the office users (i.e.: telephone
directory, etc) I am looking for recommendations for good
books/whitepapers, websites, etc to help get me up to speed.

I have looked at the Scripting repository and have started to toy a bit
with some stuff there (script to pull AD users into an excel Spread***
for one) but can't seem to figure out how to get only active
(non-disabled users).

Thanks for any help and guidance you can offer.

Besides the Technet Script Center, the best resource is "Microsoft Windows
2000 Scripting Guide - Automating System Administration". I like the hard
copy text, but it is also available online at:

http://www.microsoft.com/technet/scriptcenter/guide/sagsas_overview.mspx?mfr=true

For tips on using ADO to search AD in scripts see this link:

http://www.rlmueller.net/ADOSearchTips.htm

For example, to filter on all non-disabled users:

strFilter = "(&(objectCategory=person)(objectClass=user)" _

& "(!userAccountControl:1.2.840.113556.1.4.803:=2))"



For documentation on Active Directory attributes see this link:



http://www.rlmueller.net/UserAttributes.htm


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




.


Loading