Solved

How to include additional properties on Powershell Get-QADUser

Posted on 2013-01-28
2
1,558 Views
Last Modified: 2013-01-28
My AD has been extended with custom attributes, and I find that I have to use -IncludeProperties or else the properties won't be returned on my query.

Get-QADUser 'john.doe' -IncludeProperties prop1,prop2 | Select Name,prop1,prop2

Open in new window


I'd like to make my custom attributes part of the default properties for the Get-QADUser cmdlet without having to use the -IncludeProperties switch, how do I do this?
Get-QADUser 'john.doe' | Select Name,prop1,prop2

Open in new window

0
Comment
Question by:bndit
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
bndit earned 0 total points
ID: 38829545
Ok, so I found the solution; you have to add these additional attributes to your profile

$attributes = Get-QADPSSnapinSettings -DefaultOutputPropertiesForUserObject
$attributes += 'prop1','prop2'

Set-QADPSSnapinSettings -DefaultOutputPropertiesForUserObject $attributes

Open in new window


Reference links:
http://fatbeards.blogspot.com/2010/09/wheres-my-attribute.html
http://technet.microsoft.com/en-us/library/ee692764.aspx
0
 
LVL 2

Author Closing Comment

by:bndit
ID: 38829547
Found my own solution
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

26 Experts available now in Live!

Get 1:1 Help Now