Solved

Exporting Users from Active Directory with Account Options

Posted on 2013-05-11
1
408 Views
Last Modified: 2013-06-04
Hi,

I need to export the user's list from Active directory with "Account Option", like password never expires, user cannot change password...etc, for each users in an excel.

I know how to export user's . so please donot respond with that answer.

Regards
0
Comment
Question by:skoshy123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
Prashant Girennavar earned 250 total points
ID: 39159197
If you use powershell,

Please use below code.

 
import-module activedirectory
$Users = Get-ADUser -Filter * -searchbase "dc=contoso,dc=com"
$info = @()
Foreach($User in $USers)
{
$info+= $USer | Select-Object @{l='DirectoryName';E={$_.SamAccountName}},@{l='Email';E={$_.Mail}},@{l='DisplayName';E={$_.Displayname}},@{l='AccountEnabled';E={$_.Enabled}},@{l='Name';E={$_.Name}},@{l='LastName';E={$_.Surname}},@{l='phone';E={$_.MobilePhone}} ,@{l='UserCanChangePassword';E={$_.CannotChangePassword}}
}
$info>>C:\Useraccount.txt

Open in new window


Please change the DN name DC=contoso,dc=com according to your domain name

Thanks,

-Prashant Girennavar.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Redirected folders in a windows domain can be quite useful for a number of reasons, one of them being that with redirected application data, you can give users more seamless experience when logging into different workstations.  For example, if a use…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question