Convert AD Account property - Account Expires


hey

 i have totally lost command to  convert value example accountexpires user friendly time value. if u drop command wopuld appreciated


mcsa / mcts

in powershell 2.0, system.directoryservices.directoryentry type has a new convertlargeintegertoint64 codemethod can use this:

ps>$user = [adsi]"ldap://cn=testuser,ou=testou,dc=test,dc=local"

ps>[datetime]::fromfiletime($user.convertlargeintegertoint64($user.accountexpires[0]))

saturday, april 24, 2010 12:00:00 am





aleksandar nikolić http://powershellers.blogspot.com http://twitter.com/alexandair


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Azure MFA with Azure AD and RDS

Failed to setup initiator portal. Error status is given in the dump data.

Invalid pointer on gpresult /h gpreport.html