It must be the company I keep when I travel (-%

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Laura E. Hunter
Sent: Tuesday, October 11, 2005 1:43 PM
To: [email protected]
Subject: Re: [ActiveDir] ADFIND mods


You know that's just crazy talk, right Al?  ;-)

- L

On 10/11/05, Al Mulnick <[EMAIL PROTECTED]> wrote:
> Yay!!!
>
> Uh, one thing though. While you're mod'ing the CSV output, can you 
> make it so that we can pick the separator character?  I know the 
> purists out there wouldn't like to call something a csv if it's not, 
> well comma separated, but it's sometimes useful to utilize other 
> separator characters.  Please?
>
> -ajm
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of joe
> Sent: Tuesday, October 11, 2005 1:30 AM
> To: [email protected]
> Subject: [ActiveDir] ADFIND mods
>
>
> Not trying to scare anyone but I actually might have somehow hacked 
> CSV support into the V1.* version of adfind.
>
> Jerry[1] pulled me off to the side at the MVP summit during the Exec 
> sessions and threatened to thrash me if I didn't add the ability to 
> support sorting the attribute output order for objects into adfind. 
> Well actually he said it very nicely, Jerry is a very nice guy. I say 
> this in case you don't know him personally. Then Marty List said that 
> is a great idea and then Dean said it was a good idea which almost 
> made me not do it because Dean doesn't like me but I decided I liked 
> Jerry and Marty enough to overcome the dislike Dean has. Yup. ;o) So I 
> got home from the summit, received my email to myself to remind myself 
> that I needed to make that mod for Jerry so I didn't have to keep 
> looking in the rearview mirror and sending my cat out to start the 
> truck. So I pulled up the adfind code and scrolled through it (since I 
> hadn't looked at the overall flow in months) to reaquaint myself with 
> how hacked it is (it really is at this point, positively evil). Then I 
> closed it and waiting until the bug bit me to tell me my mind had 
> somehow figured out how to insert the new code...
>
> Well it bit me tonight while watching My Name is Earl on the Media 
> Center PC. I had worked out where I needed to further hack the code 
> and opened it up and started slinging code and have been doing so for 
> the last couple of hours though now I have to rewatch Earl because I 
> lost the thread of what was happening.
>
> After I stuck in Jerry's attribute sort so that an object will return 
> the attributes in an order sorted by attribute name say
>
> >cn: Users
> >dSCorePropagationData: 20050805040803.0Z
> >dSCorePropagationData: 20050805040622.0Z
> >dSCorePropagationData: 20050805032808.0Z
> >dSCorePropagationData: 20050805031109.0Z
> >dSCorePropagationData: 16010714223649.0Z
> >description: Default container for upgraded user accounts
> >distinguishedName: CN=Users,DC=joe,DC=com
> >instanceType: 4
> >memberOf: CN=MyDL,OU=contacts,DC=joe,DC=com
> >name: Users
> >objectCategory: CN=Container,CN=Schema,CN=Configuration,DC=joe,DC=com
> >objectClass: top
> >objectClass: container
> >objectGUID: {48F745DD-7E01-4151-A1EA-C7D16085DAE6}
> >uSNChanged: 3021990
> >uSNCreated: 16365
> >whenChanged: 20050805051458.0Z
> >whenCreated: 20040309041843.0Z
>
> instead of the default return order from the server of
>
> >objectClass: top
> >objectClass: container
> >cn: Users
> >description: Default container for upgraded user accounts
> >distinguishedName: CN=Users,DC=joe,DC=com
> >instanceType: 4
> >whenCreated: 20040309041843.0Z
> >whenChanged: 20050805051458.0Z
> >uSNCreated: 16365
> >memberOf: CN=MyDL,OU=contacts,DC=joe,DC=com
> >uSNChanged: 3021990
> >name: Users
> >objectGUID: {48F745DD-7E01-4151-A1EA-C7D16085DAE6}
> >objectCategory: CN=Container,CN=Schema,CN=Configuration,DC=joe,DC=com
> >dSCorePropagationData: 20050805040803.0Z
> >dSCorePropagationData: 20050805040622.0Z
> >dSCorePropagationData: 20050805032808.0Z
> >dSCorePropagationData: 20050805031109.0Z
> >dSCorePropagationData: 16010714223649.0Z
>
> I decided to add a quick list function which combines -nodn -nolabel 
> and inserts the attribute specified into the -sort or -rsort without 
> having to type the attribute again which I have wanted for some time 
> because I was tired of typing all of that stuff all of the time.
>
> I then decided since it was all going too smoothly I should take a 
> shot at CSV output because I really need to crash it good when I am 
> adding new things so I can slap my forehead and think, what in the 
> world do I do this for. Plus the mechanism I had set up to pull off 
> Jerry's option I had architected in such a way that CSV was at least 
> remotely possible theoretically and how dare I not test the theory.
>
> This CSV option only works with DN and name if you don't specify 
> specific attributes or it works with the attributes you specify though 
> DN will always be the first column. Amazingly, it seems to be working 
> and it isn't entirely slow. I have to play with it some more and I 
> thought of a couple of other options to try and stick in and break 
> things before I start officially beta testing it. Once I get to that 
> point I may annoy some folks into testing it out for me. If you use 
> adfind a lot and would like to test the new version when I am ready to 
> let someone find the holes, respond to me with this email and why you 
> would like to test it and I will put you in the hat. Oh here is what 
> the csv output looks like at the moment....
>
> F:\Dev\CPP\AdFind>adfind -h 2k3dc01 -default -s one  name objectclass 
> whenchanged -csv -sort name "dn","name","objectclass","whenchanged"
> "CN=Builtin,DC=joe,DC=com","Builtin","top;builtinDomain","200406252345
> 26.0Z"
>
"OU=CleanOU,DC=joe,DC=com","CleanOU","top;organizationalUnit","2005080401461
> 3.0Z"
>
"CN=Computers,DC=joe,DC=com","Computers","top;container","20040625234526.0Z"
>
"OU=contacts,DC=joe,DC=com","contacts","top;organizationalUnit","20050821222
> 039.0Z"
> "OU=Domain Controllers,DC=joe,DC=com","Domain
> Controllers","top;organizationalUnit","20040625234526.0Z"
>
"OU=Exchange,DC=joe,DC=com","Exchange","top;organizationalUnit","20040625234
> 707.0Z"
>
"CN=ForeignSecurityPrincipals,DC=joe,DC=com","ForeignSecurityPrincipals","to
> p;container","20040625234526.0Z"
>
"CN=Infrastructure,DC=joe,DC=com","Infrastructure","top;infrastructureUpdate
> ","20050613155937.0Z"
>
"CN=LostAndFound,DC=joe,DC=com","LostAndFound","top;lostAndFound","200406252
> 34526.0Z"
> "CN=Microsoft Exchange System Objects,DC=joe,DC=com","Microsoft Exchange
> System
> Objects","top;container;msExchSystemObjectsContainer","20050330022442.0Z"
> "CN=NTDS Quotas,DC=joe,DC=com","NTDS
> Quotas","top;msDS-QuotaContainer","20040625234526.0Z"
> "CN=Program Data,DC=joe,DC=com","Program
> Data","top;container","20040625234655.0Z"
>
"OU=Sales,DC=joe,DC=com","Sales","top;organizationalUnit","20050920020829.0Z
> "
>
"OU=someapp,DC=joe,DC=com","someapp","top;organizationalUnit","2005082405111
> 4.0Z"
>
"CN=someapp2,DC=joe,DC=com","someapp2","top;person;organizationalPerson;user
> ","20050824051145.0Z"
> "CN=System,DC=joe,DC=com","System","top;container","20040625234526.0Z"
>
"OU=TestOU,DC=joe,DC=com","TestOU","top;organizationalUnit","20050715071524.
> 0Z" "CN=Users,DC=joe,DC=com","Users","top;container","20050805051458.0Z"
>
>
>    joe
>
>
>
> [1] Yes that Jerry, Jerold Schulman, of the reghacks / JSI Inc web 
> site. http://www.jsiinc.com/aboutJSI.htm
>
> List info   : http://www.activedir.org/List.aspx
> List FAQ    : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
> List info   : http://www.activedir.org/List.aspx
> List FAQ    : http://www.activedir.org/ListFAQ.aspx
> List archive: 
> http://www.mail-archive.com/activedir%40mail.activedir.org/
>


--
-----------------------
Laura E. Hunter
Microsoft MVP - Windows Server Networking
Author: _Active Directory Consultant's Field Guide_
(http://tinyurl.com/7f8ll)
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to