Possible, If you have not tried anything so far for this, would suggest you to start putting up some code with the help of the help documentation of Get-ADUser and Set-ADUser cmdlets, may be help doc for Foreach-Object as well to start with. Folks here will help you when you get stuck.
[quote quote=197579]Possible, If you have not tried anything so far for this, would suggest you to start putting up some code with the help of the help documentation of Get-ADUser and Set-ADUser cmdlets, may be help doc for Foreach-Object as well to start with. Folks here will help you when you get stuck.
[/quote]
yes i tried below script but its throwing some kind of error
If you want all characters to Uppercase, while this is easy, I would not recommend it as Active Directory feeds many other business systems, signatures, etc. and it appears like someone is screaming your name in all of these systems. I usually have to fix applicants that use all caps on everything in Applicant Tracking Systems when they apply for a job before they are placed into HRM systems that feed into Active Directory. Start by collecting all of the names with Get-ADUser and if all users in scope are under an OU use the -SearchBase parameter and add -Properties SurName.
$users = Get-ADUser -Filter * -Properties SurName
Once you have the names, then apply the code to do the text transformation to validate and then you can use Set-ADUser to update the users.
If you want all characters to Uppercase, while this is easy, I would not recommend it as Active Directory feeds many other business systems, signatures, etc. and it appears like someone is screaming your name in all of these systems. I usually have to fix applicants that use all caps on everything in Applicant Tracking Systems when they apply for a job before they are placed into HRM systems that feed into Active Directory. Start by collecting all of the names with Get-ADUser and if all users in scope are under an OU use the -SearchBase parameter and add -Properties SurName.
Once you have the names, then apply the code to do the text transformation to validate and then you can use Set-ADUser to update the users.
[/quote]
Hello Rob,
# Retrieve the Surname property (the sn attribute) of all users in the specified OU.
$Users =Get-ADUser-SearchBase"ou=Sales,ou=West,dc=domain,dc=com"-Filter{Surname-Like"*"}|SelectDistinguishedName,SurnameForEach($User In $Users){
$DN = $User.DistinguishedName
$Name = $User.Surname# Desired case.
$NewName = $Name.ToUpper() }
this above script worked for me it changed to all my surnames to uppercase but only thing is in DISPLAY NAME its still showing small case
hhow can i change that ?