Solved

How to include additional properties on Powershell Get-QADUser

Posted on 2013-01-28
2
1,587 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

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…
Set OWA language and time zone in Exchange for individuals, all users or per database.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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