Solved

Exporting Users from Active Directory with Account Options

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

820 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