Solved

AD | Powershell

Posted on 2014-11-04
3
98 Views
Last Modified: 2014-11-10
Could i please seek assistance for a script to..

export all the usernames of users in active directory

where the homedirectory path and email are both blank
0
Comment
Question by:cmatchett
[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
3 Comments
 
LVL 29

Assisted Solution

by:becraig
becraig earned 250 total points
ID: 40422522
Something like this might work:
Get-ADUser -filter { (EmailAddress -eq $null) -and (homedirectory  -eq $null) }

Open in new window

0
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 250 total points
ID: 40424915
Since those properties are strings you may also try this if $null doesnt work.

Get-ADUser -Filter {( EmailAddress -notlike "*") -and (homedirectory -notlike "*")} | Select Name,SamAccountName

Open in new window

0
 

Author Closing Comment

by:cmatchett
ID: 40432685
thanks guys!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

695 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