Welcome to Active Directory Powershell Blog! This blog is written by a group of developers, testers, program managers and technical writers from the Active Directory Powershell team.

We are here to answer any questions about AD Powershell, share some tips and tricks, discuss the history behind certain decisions and features and hear your feedback on improving AD Powershell experience.

Comments (4)

  1. slawtey says:

    basics needed,

    currently learning the basic of power shell and what it can do, what im trying to do is create a script that imports user to AD,

    we create sharepoint portals and this is something that would be very handy…

    any tips would be greatly appreciated.



  2. M. Ali says:


    Learn how to install AD Powershell: blogs.msdn.com/…/installation

    Go through the blog posts and use the on the box help (e.g. "help New-ADUser"). Some online info: technet.microsoft.com/…/dd378937(WS.10).aspx

    For your scenario, you might want to look at pipelining the Import-Csv cmdlet. Like: Import-Csv … | New-ADUser …

  3. When Set-ADAccountPassword is using the -PassThru switch the object is NOT passed thru!

    Set-ADAccountPassword -Identity "alain" -Reset -PassThru | Get-Member

    Entrez le mot de passe souhaité pour « CN=alain,OU=TestOU,DC=contoso,DC=com »

    Mot de passe : *********

    Répétez le mot de passe : *********

    Get-Member : Aucun objet n'a été spécifié à l'applet de commande get-member.

    Au niveau de ligne : 1 Caractère : 68

    • Set-ADAccountPassword -Identity alain -Reset -PassThru | Get-Member <<<<

         + CategoryInfo          : CloseError: (:) [Get-Member], InvalidOperationException

         + FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand

  4. mamadukes2007 says:

    I am new to Powershell. I need to create a script that will identify Active Directory Users Accounts that have the employee type extension attribute set to "T" and the last login date is greater than 90 days. I wrote the following & know that something is happening, but nothing appears. Can you tell me what is wrong here?

    import-module ActiveDirectory

    cd AD:

    Number of Days to see if account has been active


    Get-ADUser -Filter 'employeeType -like "E*"' | where { ($_.LastLogonTimeStamp).Days -gt $NumberDays } |  FT Name, SamAccountName, LastLogonTimeStamp -AutoSize