Solved

changing custom attribute label in a powerhsell report

Posted on 2014-11-17
2
168 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
Comment Utility
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
Comment Utility
Straight to the point

I tries and it works just fine
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

772 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

13 Experts available now in Live!

Get 1:1 Help Now