Solved

How to include additional properties on Powershell Get-QADUser

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
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 …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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