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