Welcome to MSDN Blogs Sign in | Join | Help

Decrypt my World

Cryptography, Security, Debugging and more!

News

  • Any of my posts is supported under any Microsoft standard support program or service. They are provided "AS IS" without warranty of any kind, and confer no rights.

Where are my readers?

Locations of visitors to this page

Favorite Posts

Browse by Tags

All Tags » ADSI   (RSS)
How to get LastLogon property for all users in a Domain (VBScript)
Hi all, The following VBScript sample retrieves all users in Active Directory that haven't ever logged on the domain, or haven't logged on for at least maxDays (an argument passed to the script): On Error Resume Next ' Constants ' Const ONE_HUNDRED_NANOSECOND Read More...
How to get more than 1000 group members including foreign SAMs (VBScript)
Hi all, We may have a group in our Active Directory with members from a foreign domain . We may try to retrieve all those members with ADSI and a code like this: Using IADs::GetInfoEx for Range Retrieval . The issue with this code is that we will only Read More...
System.DirectoryServices.DirectorySynchronization returns access denied with non-admin users
Hi all, You may get an Access Denied error ( COMException 0x80070005 ) when using System.DirectoryServices.DirectorySynchronization in your .NET application with a non-admin user , but everything works fine with a domain administrator. This issue will Read More...
ChangePassword method may fail with TargetInvocationException (.NET)
Hi all, welcome back, When working with System.DirectoryServices.DirectoryEntry in .NET , we may change the password of the user with a code like the following ( C# ): user.Invoke("ChangePassword", new object[] { oldPassword, newPassword } But invoking Read More...
How to get a list of all users in an OU (VBScript)
Hi all, welcome back, Today I'll post a very straight forward sample which gets a list of all users in an Organizational Unit ( OU ) in Active Directory ( AD ) using VBScript : ' Get OU ' strOU = "OU=Users,DC=domain,DC=com" ' Create connection to AD ' Read More...
How to get ADs Providers list (C#)
Hi, welcome back, We may want to get the list of Active Directory Providers (" LDAP: ", " WinNT: ", " IIS: "...) with .NET the same way we do it with this VBScript : Set ads = GetObject("ADs:") For Each provider In ads Wscript.Echo provider.Name Next Read More...
Page view tracker