Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

changing custom attribute label in a powerhsell report

Posted on 2014-11-17
2
179 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

792 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