RE: [ActiveDir] ADFIND mods

2005-11-04 Thread joe
ADFIND V01.27.00 is now out of beta. Final version is available at

http://www.joeware.net/win/free/tools/adfind.htm

Thanks to those who beta tested and forwarded on input.

   joe
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Tuesday, October 25, 2005 10:59 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

Beta 2 is ready. Same download location.

http://www.joeware.net/win/free/tools/adfind-beta.htm



I have fixed a couple of bugs I found and some others reported.

Also added a couple of items that I thought of and/or were recommended.

-tdcs   - time decode in more easily sortable format than -tdc. CSV really
helped drive this change. I had everything in place for it, just didn't have
it exposed via a switch. 

-utc- output -tdc/-tdcs in UTC instead of local TZ

Also have -tdc/-tdcs output TZ so you know what it is.

-nocsvheader  - doesn't list attribute header at top of csv output

-po  - print out all switches and attributes specified. This will dump out
everything set through command line as well as -e and -ef options.


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Wednesday, October 19, 2005 12:15 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

I have finished the initial pass through the adfind updates. I have done
some testing and allowed a few others to test it and am now opening up the
beta to this list, please don't forward as I don't want a bunch of people
using the beta 2 months from now. 

o Phantom Root capability (-pr) - Allows you to search across all partitions
across a DC or ADAM instance based on specified base. I.E. -b .com would
retrieve *.com partitions.  -b  would retrieve all partitions say all ADAM
partitions or default domain, config, and schema of a DC (even if it isn't a
GC).

o Added list (-list) - output from adfind is in list format. For instance
say you want a simple list of ldapdisplaynames of all the attributes in the
schema. You could use a query like 

Adfind -schema -f objectcategory=attributeschema ldapdisplayname -list

If you want the output sorted by ldapdisplayname, you do not have to specify
-sort ldapdisplayname, if you specify -sort or -rsort it will automatically
assume you want ldapdisplayname or whatever other attribute you are listing
by. However, if you want it sorted by some other attribute, you can still
specify it.

o Added -soao - Sorted order attribute output. Jerry Schulman asked me for
this and the next update. This sorts the attributes output for each object
by attribute name so they will be in a consistent order. This is nice for
scripting in the scripting languages that have minimal parsing capabilities
(like not Perl) ;o)

o -oao - Ordered attribute output. Attribute output for each object is in
the order you specify attributes to be returned in the command submitted.
Not only that, but if a specific object doesn't have one of the attributes,
it will still put a slot in the output for that attribute. By default that
slot will be empty (attribname:) but if you like, you can specify a value
to insert (this is from Al Mulnick from some time last year) like say
#undef# so if an attribute you specify to be returned will have that value
in the output (attribname: #undef#). This is done by specifying that string
after the -oao switch.

o CSV output... You must specify a list of attributes to be returned, if you
don't it will autoselect dn and name for you. If you don't want to specify a
list of attributes, you can still use adcsv.pl (Should I compile that?).
Supporting switches are -csvdelim, -csvmvdelim, -csvq. The delim switches
let you specify delimiters for the attribs and the values of a mv attrib.
csvq lets you specify a different value to quote the attributes, default is
the quote character. -nodn is supported with -csv... 

o -incldn and -incldndelim - these are like -excldn and -excldndelim but
allows you to filter on what you want to see versus what you don't want to
see. Remember, all data from the query comes back, this will simply filter
out unwanted objects on display.

o Added the ability to decode msDS-User-Account-Control-Computed when using
-samdc

o Added decode for AzMan groups (basic and query based) with -samdc on
grouptypes.  

o Fixed a bug in the filter expansion of the stats+ output. It would blow it
if there were parens in the output that wasn't related to the filter itself.

o Added environment option (-e). We discussed this functionality and the
next functionality on the list a while back. You can specify environment
variables and adfind will read them and use them like they were specified on
the command line. Switches provided at the command line will override
anything specified in the env vars. Attributes specified will be in addition
to what is specified on the command line. The default prefix for the env
vars is adfind-. So if you wanted to specify

RE: [ActiveDir] ADFIND mods

2005-10-25 Thread joe
Beta 2 is ready. Same download location.

http://www.joeware.net/win/free/tools/adfind-beta.htm



I have fixed a couple of bugs I found and some others reported.

Also added a couple of items that I thought of and/or were recommended.

-tdcs   - time decode in more easily sortable format than -tdc. CSV really
helped drive this change. I had everything in place for it, just didn't have
it exposed via a switch. 

-utc- output -tdc/-tdcs in UTC instead of local TZ

Also have -tdc/-tdcs output TZ so you know what it is.

-nocsvheader  - doesn't list attribute header at top of csv output

-po  - print out all switches and attributes specified. This will dump out
everything set through command line as well as -e and -ef options.


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Wednesday, October 19, 2005 12:15 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

I have finished the initial pass through the adfind updates. I have done
some testing and allowed a few others to test it and am now opening up the
beta to this list, please don't forward as I don't want a bunch of people
using the beta 2 months from now. 

o Phantom Root capability (-pr) - Allows you to search across all partitions
across a DC or ADAM instance based on specified base. I.E. -b .com would
retrieve *.com partitions.  -b  would retrieve all partitions say all ADAM
partitions or default domain, config, and schema of a DC (even if it isn't a
GC).

o Added list (-list) - output from adfind is in list format. For instance
say you want a simple list of ldapdisplaynames of all the attributes in the
schema. You could use a query like 

Adfind -schema -f objectcategory=attributeschema ldapdisplayname -list

If you want the output sorted by ldapdisplayname, you do not have to specify
-sort ldapdisplayname, if you specify -sort or -rsort it will automatically
assume you want ldapdisplayname or whatever other attribute you are listing
by. However, if you want it sorted by some other attribute, you can still
specify it.

o Added -soao - Sorted order attribute output. Jerry Schulman asked me for
this and the next update. This sorts the attributes output for each object
by attribute name so they will be in a consistent order. This is nice for
scripting in the scripting languages that have minimal parsing capabilities
(like not Perl) ;o)

o -oao - Ordered attribute output. Attribute output for each object is in
the order you specify attributes to be returned in the command submitted.
Not only that, but if a specific object doesn't have one of the attributes,
it will still put a slot in the output for that attribute. By default that
slot will be empty (attribname:) but if you like, you can specify a value
to insert (this is from Al Mulnick from some time last year) like say
#undef# so if an attribute you specify to be returned will have that value
in the output (attribname: #undef#). This is done by specifying that string
after the -oao switch.

o CSV output... You must specify a list of attributes to be returned, if you
don't it will autoselect dn and name for you. If you don't want to specify a
list of attributes, you can still use adcsv.pl (Should I compile that?).
Supporting switches are -csvdelim, -csvmvdelim, -csvq. The delim switches
let you specify delimiters for the attribs and the values of a mv attrib.
csvq lets you specify a different value to quote the attributes, default is
the quote character. -nodn is supported with -csv... 

o -incldn and -incldndelim - these are like -excldn and -excldndelim but
allows you to filter on what you want to see versus what you don't want to
see. Remember, all data from the query comes back, this will simply filter
out unwanted objects on display.

o Added the ability to decode msDS-User-Account-Control-Computed when using
-samdc

o Added decode for AzMan groups (basic and query based) with -samdc on
grouptypes.  

o Fixed a bug in the filter expansion of the stats+ output. It would blow it
if there were parens in the output that wasn't related to the filter itself.

o Added environment option (-e). We discussed this functionality and the
next functionality on the list a while back. You can specify environment
variables and adfind will read them and use them like they were specified on
the command line. Switches provided at the command line will override
anything specified in the env vars. Attributes specified will be in addition
to what is specified on the command line. The default prefix for the env
vars is adfind-. So if you wanted to specify a host to use in the env vars,
say because you don't want to keep typing it, you could type

Set adfind-h=hostname.somedomain.someotherdomain.somedomain.com 

And then when you do adfind and specify the -e switch it will pull that in
and use it. 

If you want to specify a different prefix you specify it after the -e like
for instance -e adam1  -e adam2   -adam3 and then you could have

RE: [ActiveDir] ADFIND mods

2005-10-18 Thread joe
 the filename after the -ef.


o Modified help so that hopefully it isn't so intimidating when you first
try it. I started looking at making it so every switch gave full examples,
etc but then realized I wasn't making this for my grandmother to use and
figured a compentent AD Admin should be able to work out how to use most of
the switches with the help given. If you find specific examples that you
don't agree with me on, email me what you think is wrong and how you think
it should be.





You can download from the following location. Please download with the
understanding that when I publish the release version in a week or two or
three that you will delete the beta and get the new version.

http://www.joeware.net/win/free/tools/adfind-beta.htm


If you try it and find an issue, please email me directly.
 

   thanks, joe



 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Wednesday, October 12, 2005 1:59 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

You will need multiple t-shirts, so far I have added around 10 new switches
for V01.27.00. I have had a muse sitting near me or something. ;o) I decided
it would still be quite a while for V2.* as I want to do some other things
first so I figured I would shove a bunch of stuff in now. 

I am also looking at the usage screen too to see if I can give a simple help
and an advanced help and probably a only look at this help if you really
understand what you are doing help. I figure the simple help will show how
to build the simplest query. The other screens will go from there. Honestly,
I don't expect everyone to use every aspect of adfind. Many people will do
things in a possibly simpler and a more inefficient manner than optimal but
that manner will be familiar to them. I offer all of the abilities adfind
has for those people who truly know what can be done so they can pull off
what they need to do at the command line without writing their own compiled
tool, hopefully in an optimal fashion. I enjoy it when Dean is forced to
admit that adfind is the only way to do this that or the other advanced
task.

 

//* V01.27.00  2005.10.xx o 08/24   Added -PR (PhantomRoot)
*
//*   o 10/10   Added -list
*
//*   o 10/10   Changed attrib output method (deep)
*
//*   o 10/10   Added -soao (Sorted order attr out)
*
//*   o 10/10   Added -oao (order attr out)
*
//*   o 10/10   Added -csv, csvdelim,csvmvdelim
*
//*   o 10/11   Added -incldn, -incldndelim
*
//*   o 10/11   Added port on basic info output
*
//*   o 10/11   Decode with -samdc
*
//*
msDS-User-Account-Control-Computed*
//*   and also more grouptypes
*
//*   o 10/11   Fixed stats filter expansion bug
*
//*   o 10/12   Added -e to read environment vars
*
//*   for setting switches/args
*


Along with the help, I have one other thing I am trying to work out a way to
handle in a generic way. If I can do it in the next few days I will. If not,
I will stop the mods and look at allowing some folks to beta.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Tuesday, October 11, 2005 10:00 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

I was waiting for the t-shirt before using it.  If it's already there, that
would be great.  Now if only I could read... dg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Tuesday, October 11, 2005 5:10 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods


Hey Al, have you actually used any of my tools? eg

I added the CSVDelim and CSVMVDelim switches before I added the CSV switch.


  ValidOptions.push_back(csvdelim);   // CSV Delimiter
  ValidOptions.push_back(csvmvdelim); // CSV Multivalue Delimiter
  ValidOptions.push_back(:list);  // List mode
  ValidOptions.push_back(:soao);  // Sort Ordered Attribute
Output
  ValidOptions.push_back(:oao);   // Ordered Attribute Output
  ValidOptions.push_back(:csv);   // CSV Output

  string CSVDelim=,;
  string CSVMVDelim=;;

  if (CmdLine.HasSwitch(csv))
   {
bQuiet=true;
bNoDN=true;
bCSV=true;
bNoLabel=false;
if (!CmdLine.NumArgs()) CmdLine.AddArg(name);
if (CmdLine.HasSwitch(csvdelim))
CSVDelim=CmdLine.GetSwitch(csvdelim);
if (CmdLine.HasSwitch(csvmvdelim))
CSVMVDelim=CmdLine.GetSwitch(csvmvdelim);
...


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Tuesday, October 11, 2005 11:07 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

RE: [ActiveDir] ADFIND mods

2005-10-12 Thread joe
You will need multiple t-shirts, so far I have added around 10 new switches
for V01.27.00. I have had a muse sitting near me or something. ;o) I decided
it would still be quite a while for V2.* as I want to do some other things
first so I figured I would shove a bunch of stuff in now. 

I am also looking at the usage screen too to see if I can give a simple help
and an advanced help and probably a only look at this help if you really
understand what you are doing help. I figure the simple help will show how
to build the simplest query. The other screens will go from there. Honestly,
I don't expect everyone to use every aspect of adfind. Many people will do
things in a possibly simpler and a more inefficient manner than optimal but
that manner will be familiar to them. I offer all of the abilities adfind
has for those people who truly know what can be done so they can pull off
what they need to do at the command line without writing their own compiled
tool, hopefully in an optimal fashion. I enjoy it when Dean is forced to
admit that adfind is the only way to do this that or the other advanced
task.

 

//* V01.27.00  2005.10.xx o 08/24   Added -PR (PhantomRoot)
*
//*   o 10/10   Added -list
*
//*   o 10/10   Changed attrib output method (deep)
*
//*   o 10/10   Added -soao (Sorted order attr out)
*
//*   o 10/10   Added -oao (order attr out)
*
//*   o 10/10   Added -csv, csvdelim,csvmvdelim
*
//*   o 10/11   Added -incldn, -incldndelim
*
//*   o 10/11   Added port on basic info output
*
//*   o 10/11   Decode with -samdc
*
//*
msDS-User-Account-Control-Computed*
//*   and also more grouptypes
*
//*   o 10/11   Fixed stats filter expansion bug
*
//*   o 10/12   Added -e to read environment vars
*
//*   for setting switches/args
*


Along with the help, I have one other thing I am trying to work out a way to
handle in a generic way. If I can do it in the next few days I will. If not,
I will stop the mods and look at allowing some folks to beta.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Tuesday, October 11, 2005 10:00 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

I was waiting for the t-shirt before using it.  If it's already there, that
would be great.  Now if only I could read... dg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Tuesday, October 11, 2005 5:10 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods


Hey Al, have you actually used any of my tools? eg

I added the CSVDelim and CSVMVDelim switches before I added the CSV switch.


  ValidOptions.push_back(csvdelim);   // CSV Delimiter
  ValidOptions.push_back(csvmvdelim); // CSV Multivalue Delimiter
  ValidOptions.push_back(:list);  // List mode
  ValidOptions.push_back(:soao);  // Sort Ordered Attribute
Output
  ValidOptions.push_back(:oao);   // Ordered Attribute Output
  ValidOptions.push_back(:csv);   // CSV Output

  string CSVDelim=,;
  string CSVMVDelim=;;

  if (CmdLine.HasSwitch(csv))
   {
bQuiet=true;
bNoDN=true;
bCSV=true;
bNoLabel=false;
if (!CmdLine.NumArgs()) CmdLine.AddArg(name);
if (CmdLine.HasSwitch(csvdelim))
CSVDelim=CmdLine.GetSwitch(csvdelim);
if (CmdLine.HasSwitch(csvmvdelim))
CSVMVDelim=CmdLine.GetSwitch(csvmvdelim);
...


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Tuesday, October 11, 2005 11:07 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

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: ActiveDir@mail.activedir.org
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

RE: [ActiveDir] ADFIND mods

2005-10-11 Thread Al Mulnick
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: ActiveDir@mail.activedir.org
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\AdFindadfind -h 2k3dc01 -default -s one  name objectclass

Re: [ActiveDir] ADFIND mods

2005-10-11 Thread Laura E. Hunter
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: ActiveDir@mail.activedir.org
 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 

Re: [ActiveDir] ADFIND mods

2005-10-11 Thread Kamlesh Parmar
If my vote counts, I would also want that.
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 itso that we can pick the separator character?I know the purists out therewouldn'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 joeSent: Tuesday, October 11, 2005 1:30 AMTo: ActiveDir@mail.activedir.org
Subject: [ActiveDir] ADFIND modsNot trying to scare anyone but I actually might have somehow hacked CSVsupport 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 supportsorting the attribute output order for objects into adfind. Well actually hesaid 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 Deansaid it was a good idea which almost made me not do it because Dean doesn'tlike 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 tomyself to remind myself that I needed to make that mod for Jerry so I didn'thave 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 Ihadn't looked at the overall flow in months) to reaquaint myself with howhacked 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 outhow to insert the new code...Well it bit me tonight while watching My Name is Earl on the Media CenterPC. 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 ofhours though now I have to rewatch Earl because I lost the thread of whatwas happening.After I stuck in Jerry's attribute sort so that an object will return the
attributes in an order sorted by attribute name saycn: UsersdSCorePropagationData: 20050805040803.0ZdSCorePropagationData: 20050805040622.0ZdSCorePropagationData: 20050805032808.0Z
dSCorePropagationData: 20050805031109.0ZdSCorePropagationData: 16010714223649.0Zdescription: Default container for upgraded user accountsdistinguishedName: CN=Users,DC=joe,DC=cominstanceType: 4
memberOf: CN=MyDL,OU=contacts,DC=joe,DC=comname: UsersobjectCategory: CN=Container,CN=Schema,CN=Configuration,DC=joe,DC=comobjectClass: topobjectClass: containerobjectGUID: {48F745DD-7E01-4151-A1EA-C7D16085DAE6}
uSNChanged: 3021990uSNCreated: 16365whenChanged: 20050805051458.0ZwhenCreated: 20040309041843.0Zinstead of the default return order from the server ofobjectClass: top
objectClass: containercn: Usersdescription: Default container for upgraded user accountsdistinguishedName: CN=Users,DC=joe,DC=cominstanceType: 4whenCreated: 20040309041843.0Z
whenChanged: 20050805051458.0ZuSNCreated: 16365memberOf: CN=MyDL,OU=contacts,DC=joe,DC=comuSNChanged: 3021990name: UsersobjectGUID: {48F745DD-7E01-4151-A1EA-C7D16085DAE6}objectCategory: CN=Container,CN=Schema,CN=Configuration,DC=joe,DC=com
dSCorePropagationData: 20050805040803.0ZdSCorePropagationData: 20050805040622.0ZdSCorePropagationData: 20050805032808.0ZdSCorePropagationData: 20050805031109.0ZdSCorePropagationData: 
16010714223649.0ZI decided to add a quick list function which combines -nodn -nolabel andinserts the attribute specified into the -sort or -rsort without having totype 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 atCSV output because I really need to crash it good when I am adding newthings 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 hadarchitected in such a way that CSV was at least remotely possibletheoretically 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 alwaysbe the first column. Amazingly, it seems to be working and it isn't entirelyslow. 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 betatesting it. Once I get to that point I may annoy some folks into testing itout 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 emailand why you would like to test it and I will put you in the hat. Oh here iswhat the csv output looks like at the momentF:\Dev\CPP\AdFindadfind -h 2k3dc01 -default -s onename objectclass

RE: [ActiveDir] ADFIND mods

2005-10-11 Thread Al Mulnick
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: ActiveDir@mail.activedir.org
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: ActiveDir@mail.activedir.org
 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

RE: [ActiveDir] ADFIND mods

2005-10-11 Thread joe
Hey Al, have you actually used any of my tools? eg

I added the CSVDelim and CSVMVDelim switches before I added the CSV switch.


  ValidOptions.push_back(csvdelim);   // CSV Delimiter
  ValidOptions.push_back(csvmvdelim); // CSV Multivalue Delimiter
  ValidOptions.push_back(:list);  // List mode
  ValidOptions.push_back(:soao);  // Sort Ordered Attribute
Output
  ValidOptions.push_back(:oao);   // Ordered Attribute Output
  ValidOptions.push_back(:csv);   // CSV Output

  string CSVDelim=,;
  string CSVMVDelim=;;

  if (CmdLine.HasSwitch(csv))
   {
bQuiet=true;
bNoDN=true;
bCSV=true;
bNoLabel=false;
if (!CmdLine.NumArgs()) CmdLine.AddArg(name);
if (CmdLine.HasSwitch(csvdelim))
CSVDelim=CmdLine.GetSwitch(csvdelim);
if (CmdLine.HasSwitch(csvmvdelim))
CSVMVDelim=CmdLine.GetSwitch(csvmvdelim);
...


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Tuesday, October 11, 2005 11:07 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

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: ActiveDir@mail.activedir.org
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

RE: [ActiveDir] ADFIND mods

2005-10-11 Thread joe



Nope it doesn't count. The csv option never would have been 
there without the ability to set the delimiter and multivalue delimiter. 


;o)


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Kamlesh 
ParmarSent: Tuesday, October 11, 2005 1:55 PMTo: 
ActiveDir@mail.activedir.orgSubject: Re: [ActiveDir] ADFIND 
mods
If my vote counts, I would also want that.
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 itso 
  that we can pick the separator character?I know the purists out 
  therewouldn'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 joeSent: Tuesday, October 11, 2005 1:30 AMTo: ActiveDir@mail.activedir.org 
  Subject: [ActiveDir] ADFIND modsNot trying to scare anyone 
  but I actually might have somehow hacked CSVsupport 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 supportsorting the attribute output order for objects into adfind. Well 
  actually hesaid 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 Deansaid it was a good idea which almost made me not do it 
  because Dean doesn'tlike 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 tomyself to remind myself that I needed to make that mod 
  for Jerry so I didn'thave 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 Ihadn't looked at the overall flow in months) 
  to reaquaint myself with howhacked 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 outhow to insert the new 
  code...Well it bit me tonight while watching My Name is Earl on the 
  Media CenterPC. 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 ofhours though now I have to rewatch Earl because I lost the 
  thread of whatwas happening.After I stuck in Jerry's attribute 
  sort so that an object will return the attributes in an order sorted by 
  attribute name saycn: UsersdSCorePropagationData: 
  20050805040803.0ZdSCorePropagationData: 
  20050805040622.0ZdSCorePropagationData: 
  20050805032808.0ZdSCorePropagationData: 
  20050805031109.0ZdSCorePropagationData: 
  16010714223649.0Zdescription: Default container for upgraded user 
  accountsdistinguishedName: CN=Users,DC=joe,DC=cominstanceType: 
  4 memberOf: CN=MyDL,OU=contacts,DC=joe,DC=comname: 
  UsersobjectCategory: 
  CN=Container,CN=Schema,CN=Configuration,DC=joe,DC=comobjectClass: 
  topobjectClass: containerobjectGUID: 
  {48F745DD-7E01-4151-A1EA-C7D16085DAE6} uSNChanged: 
  3021990uSNCreated: 16365whenChanged: 
  20050805051458.0ZwhenCreated: 20040309041843.0Zinstead of the 
  default return order from the server ofobjectClass: 
  topobjectClass: containercn: Usersdescription: Default 
  container for upgraded user accountsdistinguishedName: 
  CN=Users,DC=joe,DC=cominstanceType: 4whenCreated: 
  20040309041843.0ZwhenChanged: 20050805051458.0ZuSNCreated: 
  16365memberOf: CN=MyDL,OU=contacts,DC=joe,DC=comuSNChanged: 
  3021990name: UsersobjectGUID: 
  {48F745DD-7E01-4151-A1EA-C7D16085DAE6}objectCategory: 
  CN=Container,CN=Schema,CN=Configuration,DC=joe,DC=com 
  dSCorePropagationData: 20050805040803.0ZdSCorePropagationData: 
  20050805040622.0ZdSCorePropagationData: 
  20050805032808.0ZdSCorePropagationData: 
  20050805031109.0ZdSCorePropagationData: 16010714223649.0ZI 
  decided to add a quick list function which combines -nodn -nolabel 
  andinserts the attribute specified into the -sort or -rsort without having 
  totype 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 atCSV output 
  because I really need to crash it good when I am adding newthings 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 hadarchitected in such 
  a way that CSV was at least remotely possibletheoretically 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 alwaysbe the first column. Amazingly, it seems to 
  be working and it isn't entirelyslow. I have to play with it some

RE: [ActiveDir] ADFIND mods

2005-10-11 Thread Al Mulnick
I was waiting for the t-shirt before using it.  If it's already there, that
would be great.  Now if only I could read... dg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Tuesday, October 11, 2005 5:10 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods


Hey Al, have you actually used any of my tools? eg

I added the CSVDelim and CSVMVDelim switches before I added the CSV switch.


  ValidOptions.push_back(csvdelim);   // CSV Delimiter
  ValidOptions.push_back(csvmvdelim); // CSV Multivalue Delimiter
  ValidOptions.push_back(:list);  // List mode
  ValidOptions.push_back(:soao);  // Sort Ordered Attribute
Output
  ValidOptions.push_back(:oao);   // Ordered Attribute Output
  ValidOptions.push_back(:csv);   // CSV Output

  string CSVDelim=,;
  string CSVMVDelim=;;

  if (CmdLine.HasSwitch(csv))
   {
bQuiet=true;
bNoDN=true;
bCSV=true;
bNoLabel=false;
if (!CmdLine.NumArgs()) CmdLine.AddArg(name);
if (CmdLine.HasSwitch(csvdelim))
CSVDelim=CmdLine.GetSwitch(csvdelim);
if (CmdLine.HasSwitch(csvmvdelim))
CSVMVDelim=CmdLine.GetSwitch(csvmvdelim);
...


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Tuesday, October 11, 2005 11:07 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] ADFIND mods

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: ActiveDir@mail.activedir.org
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