Solved

changing custom attribute label in a powerhsell report

Posted on 2014-11-17
2
180 Views
Last Modified: 2014-11-17
Hi everyone

I have create a simple powershell script which include extension Attribute

my question: is it possible to change extensionAttribute label for one of my own

Get-ADUser -Filter * -properties extensionAttribute1, extensionAttribute2, extensionAttribute3, extensionAttribute15 -SearchBase "DC=gsp,DC=com" |
        SELECT Name, samaccountname, GymCard, LDCode, PrinterCode, OldLDCode , @{name="OU";expression={($_.DistinguishedName -split ",OU=")[1]}} |
        Sort-Object samaccountname
0
Comment
Question by:Physimed
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40447638
You can create a custom property in the format @{N="GymCard";E={$_.extensionAttribute1}}

For example..
Get-ADUser -Filter * -properties extensionAttribute1, extensionAttribute2, extensionAttribute3, extensionAttribute15 -SearchBase "DC=gsp,DC=com" | 
         SELECT Name, samaccountname, @{N="GymCard";E={$_.extensionAttribute1}},@{N="LDCode";E={$_.extensionAttribute2}},@{N="PrinterCode";E={$_.extensionAttribute3}},@{N="OldLDCode";E={$_.extensionAttribute15}}, @{N="OU";E={($_.DistinguishedName -split ",OU=")[1]}} |
         Sort-Object samaccountname 

Open in new window

0
 

Author Closing Comment

by:Physimed
ID: 40447664
Straight to the point

I tries and it works just fine
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

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
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…

685 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