Solved

AD | Powershell

Posted on 2014-11-04
3
79 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
3 Comments
 
LVL 28

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now