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

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS