Solved

Exporting Users from Active Directory with Account Options

Posted on 2013-05-11
1
406 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

I was asked if I could set up a fax machine so that incoming faxes were delivered to people's Exchange inboxes and so that they could send faxes from their desktops without needing to print the document first.  I knew it was possible but I had no id…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

751 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