RE: [ActiveDir] AD LDAP Data Conversion Question

2004-10-27 Thread Ken Cornetet
Title: Message



It's 
in a format called VT_FILETIME. If memory serves, it is the number of 
milliseconds since some date long ago (1600 comes to mind).

VB has 
a variant type to convert it for you.



  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  On Behalf Of Menten, JeffSent: Wednesday, October 27, 2004 
  10:23 AMTo: [EMAIL PROTECTED]Subject: 
  [ActiveDir] AD LDAP Data Conversion Question
  All, 
  I would like to extract the "lastLogon" value 
  from AD to check for orphan workstations, etc. This attribute has an INTEGER8 
  format - which, as far as I can tell, is an eight-byte data structure. Does 
  anyone know of an easy way to convert this value via VBscript to a readable 
  format that will actually print?
  Thanks, 
   - 
  Jeff M. 

   ___ 
  CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is 
  for the sole use of the intended 
  recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, 
  disclosure or distribution is 
  prohibited. If you are not the intended recipient, please 
  contact the sender by reply e-mail and 
  destroy all copies of the original message. 


RE: [ActiveDir] AD LDAP Data Conversion Question

2004-10-27 Thread Brian Desmond
Title: Message








Its the
number of 100 nanosecond (maybe millisecond) intervals since March 1, 1601 
the beginning of the Gregorian calendar system. 





Thanks.



--Brian
Desmond

[EMAIL PROTECTED]

Payton on the
web! www.wpcp.org



v - 773.534.0034 x135

f - 773.534.8101















From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Cornetet
Sent: Wednesday, October 27, 2004
2:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD LDAP
Data Conversion Question







It's in a format called VT_FILETIME. If
memory serves, it is the number of milliseconds since some date long ago (1600
comes to mind).











VB has a variant type to convert it for
you.

















-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Menten, Jeff
Sent: Wednesday, October 27, 2004 10:23
AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] AD LDAP Data
Conversion Question

All, 

I would
like to extract the lastLogon value from AD to check for orphan
workstations, etc. This attribute has an INTEGER8 format - which, as far as I can
tell, is an eight-byte data structure. Does anyone know of an easy way to
convert this value via VBscript to a readable format that will actually print?

Thanks, 
 - Jeff M. 


 


___

CONFIDENTIALITY NOTICE: This e-mail
message, including any attachments, is 
for
the sole use of the intended recipient(s) and may contain confidential 
and
privileged information. Any unauthorized review, use, disclosure or 
distribution
is prohibited. If you are not the intended recipient, please 
contact
the sender by reply e-mail and destroy all copies of the original 
message.













RE: [ActiveDir] AD LDAP Data Conversion Question

2004-10-27 Thread Passo, Larry
Title: Message








If you use the WinNT interface instead of
LDAP, the LastLogin attribute does the conversion to a readable
format for you. Just remember in Win2k, you need to query every DC and use the
highest value.











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Cornetet
Sent: Wednesday, October 27, 2004
12:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD LDAP
Data Conversion Question







It's in a format called VT_FILETIME. If
memory serves, it is the number of milliseconds since some date long ago (1600
comes to mind).











VB has a variant type to convert it for
you.

















-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Menten, Jeff
Sent: Wednesday, October 27, 2004
10:23 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] AD LDAP Data
Conversion Question

All, 

I would
like to extract the lastLogon value from AD to check for orphan
workstations, etc. This attribute has an INTEGER8 format - which, as far as I
can tell, is an eight-byte data structure. Does anyone know of an easy way to
convert this value via VBscript to a readable format that will actually print?

Thanks, 
 - Jeff M. 


 


___

CONFIDENTIALITY NOTICE: This e-mail
message, including any attachments, is 
for
the sole use of the intended recipient(s) and may contain confidential 
and
privileged information. Any unauthorized review, use, disclosure or 
distribution
is prohibited. If you are not the intended recipient, please 
contact
the sender by reply e-mail and destroy all copies of the original 
message.











RE: [ActiveDir] AD LDAP Data Conversion Question

2004-10-27 Thread joe
Title: Message




The FILETIME structure is a 64-bit value representing the number of 
100-nanosecond intervals since January 1, 1601 (UTC).


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Brian 
DesmondSent: Wednesday, October 27, 2004 3:45 PMTo: 
[EMAIL PROTECTED]Subject: RE: [ActiveDir] AD LDAP Data 
Conversion Question


Its the 
number of 100 nanosecond (maybe millisecond) intervals since March 1, 1601  the 
beginning of the Gregorian calendar system. 


Thanks.

--Brian 
Desmond
[EMAIL PROTECTED]
Payton on 
the web! www.wpcp.org

v - 
773.534.0034 x135
f - 
773.534.8101






From: 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
On Behalf Of Ken 
CornetetSent: Wednesday, 
October 27, 2004 2:40 PMTo: 
[EMAIL PROTECTED]Subject: RE: [ActiveDir] AD LDAP Data 
Conversion Question


It's in a format called 
VT_FILETIME. If memory serves, it is the number of milliseconds since some date 
long ago (1600 comes to mind).



VB has a variant type 
to convert it for you.





  -Original 
  Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  On Behalf Of Menten, 
  JeffSent: Wednesday, October 
  27, 2004 10:23 AMTo: 
  [EMAIL PROTECTED]Subject: [ActiveDir] AD LDAP Data 
  Conversion Question
  All, 
  
  I would 
  like to extract the "lastLogon" value from AD to check for orphan 
  workstations, etc. This attribute has an INTEGER8 format - which, as far as I 
  can tell, is an eight-byte data structure. Does anyone know of an easy way to 
  convert this value via VBscript to a readable format that will actually 
  print?
  Thanks, 
   - Jeff M. 
  
___ 
  CONFIDENTIALITY 
  NOTICE: This e-mail message, including any 
  attachments, is for the sole use of the intended 
  recipient(s) and may contain confidential and privileged 
  information. Any unauthorized review, use, disclosure or 
  distribution is prohibited. 
  If you are not the intended recipient, please contact 
  the sender by reply e-mail and destroy all copies of the original 
  message. 
  


RE: [ActiveDir] AD LDAP Data Conversion Question

2004-10-27 Thread joe
Title: AD LDAP Data Conversion Question



Yep, barring using pwdLastSet you can use 
lastLogonTimeStamp if in a 2K3 forest at the correct functional mode. 


I believe Robbie Allen posted a script on his website for 
doing this conversion also but if I recall there were possible issues with it 
not always coming out with the correct value but it has been a while since I 
poked into it. I think I wrote something to do this as well in perl but it 
depends on having access to the ctime function. 

From vbscript, I would hunt down stuff by Richard Mueller, 
he would have the method to do it if there is one available for 
vbscript.

 joe


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Al 
LilianstromSent: Wednesday, October 27, 2004 12:32 PMTo: 
[EMAIL PROTECTED]Subject: RE: [ActiveDir] AD LDAP Data 
Conversion Question

The pwdlastset attribute shouldgive youwhat you 
want for computer accounts. This was just discussed in the last week or so on 
this list.

Check the oldcmp tool from joeware.net - http://www.joeware.net/win/free/tools/oldcmp.htmto 
be exact. It'll do this (and more) and give you a usable report. If you want to 
do it on your own with perl I have a snippet that will convert the number in 
pwdlastset to a date.

 al
--Al 
LilianstromCD/CSS/CSI[EMAIL PROTECTED] 



From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Menten, 
JeffSent: Wednesday, October 27, 2004 10:23 AMTo: 
[EMAIL PROTECTED]Subject: [ActiveDir] AD LDAP Data 
Conversion Question

All, 
I would like to extract the "lastLogon" value 
from AD to check for orphan workstations, etc. This attribute has an INTEGER8 
format - which, as far as I can tell, is an eight-byte data structure. Does 
anyone know of an easy way to convert this value via VBscript to a readable 
format that will actually print?
Thanks, 
 - 
Jeff M. 
 
 ___ 
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is 
for the sole use of the intended recipient(s) 
and may contain confidential and privileged 
information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 


RE: [ActiveDir] AD LDAP Data Conversion Question

2004-10-27 Thread joseph.e.kaplan
Title: AD LDAP Data Conversion Question








FWIW, in .NET, you just the get value
from the DirectorySearchers SearchResult as Int64 and pass that to
DateTime.FromFileTime(). When using the DirectoryEntry, slightly more
jumping through hoops must be done, but it works too.



That works for any INTEGER8 value in AD
that stores a FILETIME unless it is set to 0 or -1. In those cases, it isnt
a valid datetime, so you must proceed accordingly.



Joe K.











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Wednesday, October 27, 2004
3:12 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD LDAP
Data Conversion Question





Yep, barring using pwdLastSet you can use
lastLogonTimeStamp if in a 2K3 forest at the correct functional mode. 



I believe Robbie Allen posted a script on
his website for doing this conversion also but if I recall there were possible
issues with it not always coming out with the correct value but it has been a
while since I poked into it. I think I wrote something to do this as well in
perl but it depends on having access to the ctime function. 



From vbscript, I would hunt down stuff by
Richard Mueller, he would have the method to do it if there is one available
for vbscript.



 joe









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Al Lilianstrom
Sent: Wednesday, October 27, 2004
12:32 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD LDAP
Data Conversion Question

The pwdlastset attribute shouldgive
youwhat you want for computer accounts. This was just discussed in the
last week or so on this list.



Check the oldcmp tool from joeware.net - http://www.joeware.net/win/free/tools/oldcmp.htmto
be exact. It'll do this (and more) and give you a usable report. If you want to
do it on your own with perl I have a snippet that will convert the number in
pwdlastset to a date.



 al

--

Al Lilianstrom
CD/CSS/CSI
[EMAIL PROTECTED] 















From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Menten, Jeff
Sent: Wednesday, October 27, 2004
10:23 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] AD LDAP Data
Conversion Question

All, 

I would
like to extract the lastLogon value from AD to check for orphan
workstations, etc. This attribute has an INTEGER8 format - which, as far as I
can tell, is an eight-byte data structure. Does anyone know of an easy way to
convert this value via VBscript to a readable format that will actually print?

Thanks, 
 - Jeff M. 


 


___

CONFIDENTIALITY NOTICE: This e-mail
message, including any attachments, is 
for
the sole use of the intended recipient(s) and may contain confidential 
and
privileged information. Any unauthorized review, use, disclosure or 
distribution
is prohibited. If you are not the intended recipient, please 
contact
the sender by reply e-mail and destroy all copies of the original 
message.




This message is forthe designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.