| Author | Messages | |
dwells
Posts:38
 | | 09/08/2005 8:24 AM |
| Per the subject line
... hope it proves as useful to some of you as it has been to me this
week. As always, please verify its successful execution in a lab before
use in a production environment.
Thanks to Laura
Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean WellsMSEtechnology* Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com
:: Active Directory Object Counter - Dean Wells / MSEtechnology / Sept. 2005
:: Provides count and breakdown of objects and their class type within the supplied partition
:: - additional LDIFDE command line arguments [such as providing credentials] can be supplied by
:: pre-populating the environment variable "LDIFargs" with the desired syntax.
:: See script help for further details
@echo off
:: Define initial environment
set STDOUT=nul
set STDERR=nul
set TITLESTRING=Active Directory Object Counter
set TOGGLE=0
set FQDN=
set LOGDIR=%TEMP%\
set PARTCLASS=?
set PARTTYPE=?
if "%1"=="" goto :HELP
if "%1"=="/?" goto :HELP
setlocal ENABLEDELAYEDEXPANSION
:: Locate critical executables
for %%e in (ldifde.exe find.exe) do (
set where="%%~$PATH:e"
if "!where!"=="""" (
echo ERROR - Required executable, "%%e", not located within the path
goto :END
)
)
:: Prepare display and window title
echo/
echo STATUS - Working ...
echo/
title %TITLESTRING%
:: Determine verbosity requirements and if a DN or FQDN was supplied
set DNSorDN=%*
set VERBOSE=%*
set DNSorDN=%DNSorDN: -V=%
set DNSorDN=%DNSorDN: /v=%
set DNSorDN=%DNSorDN: -V=%
set DNSorDN=%DNSorDN: -v=%
if not "%VERBOSE%"=="%DNSorDN%" set VERBOSE=1
set ROOT=%DNSorDN:,=%
if not "%ROOT%"=="%DNSorDN%" (
set ROOT=%DNSorDN%
call :STRIPDN %DNSorDN%
if "!TOGGLE!"=="-1" (
echo ERROR - Unknown syntax supplied
goto :HELP
)
) else (
set ROOT=dc=%DNSorDN:.=,dc=%
set FQDN=%DNSorDN%
set LOGDIR=%LOGDIR%!FQDN!
)
:: Define or modify remaining environment
set CNT=0
set ICTMP=
set LOGFILE="%LOGDIR%\objcount.log"
set TMPFILE="%LOGDIR%\objcount.$$$"
set SERVER=
set TMPSYNTAX=
:: Create %LOGDIR% directory
if not exist "%LOGDIR%" (
md "%LOGDIR%" 2>%STDERR%
if errorlevel 1 (
echo ERROR - Log directory could NOT be created
echo/
echo "%LOGDIR%"
goto :END
)
)
:: Construct human-readable time
set DTIME=%TIME% & set DTIME=!DTIME:~0,8!
:: Display operational data
echo * Running on computer : %COMPUTERNAME%
:: Determine if -s [server to query against] was supplied by LDIFargs, if so, don't use %FQDN%
if not "%LDIFargs%"=="" (
set TMPSYNTAX=%LDIFargs:-s=%
set TMPSYNTAX=!TMPSYNTAX:-S=!
)
if "%TMPSYNTAX%"=="%LDIFargs%" (
echo * DSAs resolved using : %FQDN%
set SERVER=-s %FQDN%
) else (
echo * DSAs resolved using : see optional LDIF args. below
)
:: Continue displaying operational data
echo * Base DN of query is : %ROOT%
echo * Command submitted at : %DTIME% on %DATE%
if not "%LDIFargs%"=="" (
echo * Optional LDIF args. : %LDIFargs%
)
echo/
:: Construct LDAP query for all objects
echo - submitting LDAP query
set LDIFSYNTAX=ldifde -j "%LOGDIR%" %SERVER% -d %ROOT% -r objectclass=* -l objectclass -f %LOGFILE% %LDIFargs%
:: Submit LDAP query for all objects
%LDIFSYNTAX% >%STDOUT%
:: If LDFIDE returned an error, delete %LOGFILE% such that the following error check is triggered
if errorlevel 1 (
del %LOGFILE% 2>%STDERR%
)
if not exist %LOGFILE% (
echo/
echo ERROR - LDAP query failed enumerating objects
echo/
echo %LDIFSYNTAX%
goto :HELP
)
:: Construct and submit LDAP query to determine partition type
set /p = - partition type: %STDOUT%
:: Parse query result
for /f "tokens=1,2 usebackq" %%t in (%TMPFILE%) do (
if /i "%%t"=="objectclass:" (
set PARTCLASS=%%u
) else (
if /i "%%t"=="instanceType:" (
set PARTTYPE=%%u
)
)
)
:: Display partition detail
if "%PARTTYPE%"=="13" (
if /i "%PARTCLASS%"=="dmd" (
echo Schema
) else (
if /i "%PARTCLASS%"=="configuration" (
echo Configuration
) else (
if /i "%PARTCLASS%"=="domainDNS" (
echo Application [NDNC]
) else (
echo UNKNOWN [class=%PARTCLASS%/instanceType=%PARTTYPE%]
)
)
)
) else (
if "%PARTTYPE%"=="5" (
if /i "%PARTCLASS%"=="domainDNS" (
echo Domain or ADAM NDNC
) else (
echo UNKNOWN [class=%PARTCLASS%/instanceType=%PARTTYPE%]
)
) else (
echo UNKNOWN [class=%PARTCLASS%/instanceType=%PARTTYPE%]
)
)
:: Count total objects
for /f %%c in ('type %LOGFILE% ^| find /i /c "dn:"') do (
set /p = - total number of objects: >%LOGFILE%
:: Count the number of instances of each class [filter LDIF changetype: entries from log file]
echo - calculating number of instances per class [-V]
for /f "tokens=1,2 usebackq" %%n in (%LOGFILE%) do (
if /i not "%%n"=="changetype:" (
if /i not "%%n"=="dn:" (
set ICTMP=%%o
) else (
if not "!ICTMP!"=="" (
set /a CNT+=1
title %TITLESTRING% - !CNT! of %OBJTOT% ...
call set /a [$IC$]!ICTMP!+=1 2>%STDERR%
if errorlevel 1 (
set ICFIX=!ICTMP!
set ICFIX=!ICFIX:-=#$#!
call set /a [$IC$]!!ICFIX!!+=1
)
)
)
)
)
:: Ensure temporary file used below is empty
del %TMPFILE% 2>%STDERR%
:: Construct instance count temporary file
for /f "tokens=1,2 delims==" %%e in ('set [$IC$] 2^>%STDOUT%') do (
if "!INSTSTR!"=="" (
echo/
echo STATUS - The following classes were found -
echo/
)
set INSTSTR=%%e
set INSTSTR=!INSTSTR:#$#=-!
set INSTSTR=!INSTSTR:[$IC$]=!
set INSTCNT= %%f
set INSTCNT=!INSTCNT:~-10!
echo !INSTCNT! !INSTSTR!>>%TMPFILE%
)
:: Display sorted instance count
for /f "tokens=1,2" %%s in ('sort /r %TMPFILE%') do (
set INSTSTR=%%t
set INSTSTR=!INSTSTR! ....................................
set INSTSTR=!INSTSTR:~0,37! %%s
echo !INSTSTR!
)
:: Display total object count
echo/
echo TOTAL ................................. %CNT% objects
:SKIPINSTCNT
echo/
:: Construct human-readable time
set DTIME=%TIME% & set DTIME=!DTIME:~0,8!
:: Script body ends
echo Completed successfully at %DTIME% on %DATE%
goto :END
:: Define functions/subroutines
:: Convert DN to FQDN
:STRIPDN
if not "%1"=="" (
if "!TOGGLE!"=="0" (
set TYPE=%1
set TOGGLE=1
) else (
if /i "!type!"=="cn" (
set LOGDIR=!LOGDIR!%1.
set TOGGLE=0
) else (
if /i "!type!"=="dc" (
set LOGDIR=!LOGDIR!%1.
set FQDN=!FQDN!%1.
set TOGGLE=0
) else (
set TOGGLE=-1
goto :EOF
)
)
)
shift
goto :STRIPDN
)
set FQDN=%FQDN:~0,-1%
set LOGDIR=%LOGDIR:~0,-1%
goto :EOF
:HELP
echo/
echo SYNTAX - %0 ^ [-V]
echo/
echo [-V] optional, displays per-class object count
echo/
echo Additional LDIFDE command line arguments [such as providing
echo alternate credentials] can be supplied by pre-populating the
echo environment variable "LDIFargs" with the desired syntax.
echo/
echo e.g. set LDIFargs=-b Administrator MSET MyPassw0rd
echo set LDIFargs=-s cubelet.msetechnology.com
goto :END
:END
title Command Prompt
if not "%FQDN%"=="" if exist "%LOGDIR%" (
del "%TMPFILE%" "%LOGFILE%" "%LOGDIR%\ldif.err" "%LOGDIR%\ldif.log" /f /q 2>%STDERR%
rd "%LOGDIR%" 2>%STDERR%
) | | | |
| laurahcomputing
Posts:41
 | | 09/08/2005 9:01 AM |
| And as the guinea-pigger (is that a word? It is now), please allow me to say:
What an awesome script. Thanks, Dean!
- L
--
-----------------------
Laura E. Hunter
Microsoft MVP - Windows Server Networking
Author: _Active Directory Consultant's Field Guide_ (http://tinyurl.com/7f8ll) On 9/8/05, Dean Wells wrote:
> Per the subject line ... hope it proves as useful to some of you as it has
> been to me this week. As always, please verify its successful execution in
> a lab before use in a production environment.
> > Thanks to Laura Hunter for guinea-pigging it for me!
> > Kindest regards.
> > Dean
> > --
> Dean Wells
> MSEtechnology
> * Email: v-deanw@xxxxxxxxxxxxx
> http://msetechnology.com
> > 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/ | | | |
| davidadner
Posts:0
 | | 09/09/2005 1:01 AM |
| Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo: Send
- AD mailing listSubject: [ActiveDir] New tool - script to count
objects within a partition and provide a breakdown of their classes and the
count of each
Per the subject
line ... hope it proves as useful to some of you as it has been to me this
week. As always, please verify its successful execution in a lab before
use in a production environment.
Thanks to Laura
Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology* Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com | | | |
| davidadner
Posts:0
 | | 09/09/2005 1:01 AM |
| Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo: Send
- AD mailing listSubject: [ActiveDir] New tool - script to count
objects within a partition and provide a breakdown of their classes and the
count of each
Per the subject
line ... hope it proves as useful to some of you as it has been to me this
week. As always, please verify its successful execution in a lab before
use in a production environment.
Thanks to Laura
Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology* Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com | | | |
| dwells
Posts:38
 | | 09/09/2005 1:19 AM |
| Not
using an external tool is certainly an added bonus but, as I discovered
an hour or two ago, DSASTAT's functionality covers most everything OBJcount
does ... albeit a little harder to get at. It did at least cause me to
further explore aspects of DSTSTAT I was previously unfamiliar with.
Thanks
for the input
David.
--Dean WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 8:41 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxx; 'Send - AD mailing list'Subject: RE:
[ActiveDir] New tool - script to count objects within a partition and provide a
breakdown of their classes and the count of each
Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo: Send
- AD mailing listSubject: [ActiveDir] New tool - script to count
objects within a partition and provide a breakdown of their classes and the
count of each
Per the subject
line ... hope it proves as useful to some of you as it has been to me this
week. As always, please verify its successful execution in a lab before
use in a production environment.
Thanks to Laura
Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology* Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com | | | |
| davidadner
Posts:0
 | | 09/09/2005 2:41 AM |
| I still plan to check it out since I'm curious how it
works. Does it include tombstones? DSAStat does, which some might
consider a negative at times.
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 8:15 PMTo: Send
- AD mailing listSubject: RE: [ActiveDir] New tool - script to
count objects within a partition and provide a breakdown of their classes and
the count of each
Not
using an external tool is certainly an added bonus but, as I discovered
an hour or two ago, DSASTAT's functionality covers most everything
OBJcount does ... albeit a little harder to get at. It did at least
cause me to further explore aspects of DSTSTAT I was previously unfamiliar
with.
Thanks for the input David.
--Dean
WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 8:41 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxx; 'Send - AD mailing list'Subject: RE:
[ActiveDir] New tool - script to count objects within a partition and provide
a breakdown of their classes and the count of each
Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo:
Send - AD mailing listSubject: [ActiveDir] New tool - script to
count objects within a partition and provide a breakdown of their classes
and the count of each
Per the subject
line ... hope it proves as useful to some of you as it has been to me this
week. As always, please verify its successful execution in a lab
before use in a production environment.
Thanks to Laura
Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology* Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com | | | |
| dwells
Posts:38
 | | 09/09/2005 11:11 AM |
| It
doesn't by default, however, assuming you have the later versions of LDIFDE that
support the -x argument (to include tombstones) you can populate the LDIFargs
environment variable (see script help) and tack that switch on (or mod. the
script yourself) ... I've not tested it but I suspect it would
work.
--Dean WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 10:40 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxxSubject: RE: [ActiveDir] New tool -
script to count objects within a partition and provide a breakdown of their
classes and the count of each
I still plan to check it out since I'm curious how it
works. Does it include tombstones? DSAStat does, which some might
consider a negative at times.
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 8:15 PMTo: Send
- AD mailing listSubject: RE: [ActiveDir] New tool - script to
count objects within a partition and provide a breakdown of their classes and
the count of each
Not
using an external tool is certainly an added bonus but, as I discovered
an hour or two ago, DSASTAT's functionality covers most everything
OBJcount does ... albeit a little harder to get at. It did at least
cause me to further explore aspects of DSTSTAT I was previously unfamiliar
with.
Thanks for the input David.
--Dean
WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 8:41 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxx; 'Send - AD mailing list'Subject: RE:
[ActiveDir] New tool - script to count objects within a partition and provide
a breakdown of their classes and the count of each
Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo:
Send - AD mailing listSubject: [ActiveDir] New tool - script to
count objects within a partition and provide a breakdown of their classes
and the count of each
Per the subject
line ... hope it proves as useful to some of you as it has been to me this
week. As always, please verify its successful execution in a lab
before use in a production environment.
Thanks to Laura
Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology* Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com | | | |
| AD000001290
Posts:0
 | | 09/09/2005 11:24 AM |
| Does
anyone have that later version of ldifde.exe please?
Thanks,
neil
--------------------------------------- Neil Ruston Nomura International Plc Tel: 020 7521 3481 neil.ruston@xxxxxxxxxxxxx
-----Original Message-----From:
ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx]On Behalf Of Dean
WellsSent: 09 September 2005 12:08To: Send - AD mailing
listSubject: RE: [ActiveDir] New tool - script to count objects
within a partition and provide a breakdown of their classes and the count of
each
It
doesn't by default, however, assuming you have the later versions of LDIFDE
that support the -x argument (to include tombstones) you can populate the
LDIFargs environment variable (see script help) and tack that switch on (or
mod. the script yourself) ... I've not tested it but I suspect it would
work.
--Dean
WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 10:40 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxxSubject: RE: [ActiveDir] New tool -
script to count objects within a partition and provide a breakdown of their
classes and the count of each
I still plan to check it out since I'm curious how
it works. Does it include tombstones? DSAStat does, which some
might consider a negative at times.
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 8:15 PMTo:
Send - AD mailing listSubject: RE: [ActiveDir] New tool - script
to count objects within a partition and provide a breakdown of their classes
and the count of each
Not using an external tool is certainly an added bonus but, as I
discovered an hour or two ago, DSASTAT's functionality covers most
everything OBJcount does ... albeit a little harder to get at. It did
at least cause me to further explore aspects of DSTSTAT I was previously
unfamiliar with.
Thanks for the input David.
--Dean
WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 8:41 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxx; 'Send - AD mailing list'Subject:
RE: [ActiveDir] New tool - script to count objects within a partition and
provide a breakdown of their classes and the count of
each
Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo:
Send - AD mailing listSubject: [ActiveDir] New tool - script to
count objects within a partition and provide a breakdown of their classes
and the count of each
Per the
subject line ... hope it proves as useful to some of you as it has been to
me this week. As always, please verify its successful execution in a
lab before use in a production environment.
Thanks to
Laura Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology*
Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com
PLEASE READ: The information contained in this email is confidential and
intended for the named recipient(s) only. If you are not an intended
recipient of this email please notify the sender immediately and delete your
copy from your system. You must not copy, distribute or take any further
action in reliance on it. Email is not a secure method of communication and
Nomura International plc ('NIplc') will not, to the extent permitted by law,
accept responsibility or liability for (a) the accuracy or completeness of,
or (b) the presence of any virus, worm or similar malicious or disabling
code in, this message or any attachment(s) to it. If verification of this
email is sought then please request a hard copy. Unless otherwise stated
this email: (1) is not, and should not be treated or relied upon as,
investment research; (2) contains views or opinions that are solely those of
the author and do not necessarily represent those of NIplc; (3) is intended
for informational purposes only and is not a recommendation, solicitation or
offer to buy or sell securities or related financial instruments. NIplc
does not provide investment services to private customers. Authorised and
regulated by the Financial Services Authority. Registered in England
no. 1550505 VAT No. 447 2492 35. Registered Office: 1 St Martin's-le-Grand,
London, EC1A 4NP. A member of the Nomura group of companies. | | | |
| dwells
Posts:38
 | | 09/09/2005 12:55 PM |
| Comes
with 2003 SP1 I believe ...
--Dean WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of
neil.ruston@xxxxxxxxxxxxxSent: Friday, September 09, 2005 7:24
AMTo: ActiveDir@xxxxxxxxxxxxxxxxxxSubject: RE: [ActiveDir]
New tool - script to count objects within a partition and provide a breakdown of
their classes and the count of each
Does
anyone have that later version of ldifde.exe please?
Thanks,
neil
--------------------------------------- Neil Ruston Nomura International Plc Tel: 020 7521 3481 neil.ruston@xxxxxxxxxxxxx
-----Original Message-----From:
ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx]On Behalf Of Dean
WellsSent: 09 September 2005 12:08To: Send - AD mailing
listSubject: RE: [ActiveDir] New tool - script to count objects
within a partition and provide a breakdown of their classes and the count of
each
It
doesn't by default, however, assuming you have the later versions of LDIFDE
that support the -x argument (to include tombstones) you can populate the
LDIFargs environment variable (see script help) and tack that switch on (or
mod. the script yourself) ... I've not tested it but I suspect it would
work.
--Dean
WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 10:40 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxxSubject: RE: [ActiveDir] New tool -
script to count objects within a partition and provide a breakdown of their
classes and the count of each
I still plan to check it out since I'm curious how
it works. Does it include tombstones? DSAStat does, which some
might consider a negative at times.
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 8:15 PMTo:
Send - AD mailing listSubject: RE: [ActiveDir] New tool - script
to count objects within a partition and provide a breakdown of their classes
and the count of each
Not using an external tool is certainly an added bonus but, as I
discovered an hour or two ago, DSASTAT's functionality covers most
everything OBJcount does ... albeit a little harder to get at. It did
at least cause me to further explore aspects of DSTSTAT I was previously
unfamiliar with.
Thanks for the input David.
--Dean
WellsMSEtechnology* Email: dwells@msetechnology.comhttp://msetechnology.com
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of David
AdnerSent: Thursday, September 08, 2005 8:41 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxx; 'Send - AD mailing list'Subject:
RE: [ActiveDir] New tool - script to count objects within a partition and
provide a breakdown of their classes and the count of
each
Haven't run it yet, but I'm curious what benefits it
provides over dsastat.exe (or was a goal to avoid having to use an external
tool)?
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Dean
WellsSent: Thursday, September 08, 2005 3:23 PMTo:
Send - AD mailing listSubject: [ActiveDir] New tool - script to
count objects within a partition and provide a breakdown of their classes
and the count of each
Per the
subject line ... hope it proves as useful to some of you as it has been to
me this week. As always, please verify its successful execution in a
lab before use in a production environment.
Thanks to
Laura Hunter for guinea-pigging it for me!
Kindest
regards.
Dean
--Dean
WellsMSEtechnology*
Email: v-deanw@xxxxxxxxxxxxxhttp://msetechnology.com
PLEASE READ: The
information contained in this email is confidential and
intended for the
named recipient(s) only. If you are not an intended
recipient of this
email please notify the sender immediately and delete your
copy from your
system. You must not copy, distribute or take any further
action in reliance
on it. Email is not a secure method of communication and
Nomura International
plc ('NIplc') will not, to the extent permitted by law,
accept
responsibility or liability for (a) the accuracy or completeness of,
or (b) the presence
of any virus, worm or similar malicious or disabling
code in, this
message or any attachment(s) to it. If verification of this
email is sought then
please request a hard copy. Unless otherwise stated
this email: (1) is
not, and should not be treated or relied upon as,
investment research;
(2) contains views or opinions that are solely those of
the author and do
not necessarily represent those of NIplc; (3) is intended
for informational
purposes only and is not a recommendation, solicitation or
offer to buy or sell
securities or related financial instruments. NIplc
does not provide
investment services to private customers. Authorised and
regulated by the
Financial Services Authority. Registered in England
no. 1550505 VAT No.
447 2492 35. Registered Office: 1 St Martin's-le-Grand,
London, EC1A 4NP. A
member of the Nomura group of companies. | | | |
|
|