Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Adding text to Display Name attribute in AD

$
0
0

Hi there,

I have created a test user called Graham Test

I need to update the Display Name field on certain User Accounts in AD with "(External)" based on whether their Company field has certain titles.

I am okay with picking the user with certain Company names using the following:

$users=Get-ADUser-Filter {(Company-eq"Custard")}-SearchScopeSubtree-SearchBase$ouDomain|Select-ObjectDistinguishedName

But I am struggling with getting it to write the Display Name, all I get so far is the following: 

@{surName=Test}, @(givenName=Graham}(External)

and I have no idea where the @ symbols are coming from. 

Any ideas what the best way to do this would be.

I can post my script if required. 

Thanks for any ideas

Graham

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles