Announcement

Collapse
No announcement yet.

Converting all username/alias to lowercase user names in Active directory ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting all username/alias to lowercase user names in Active directory ?

    Hi All,

    I am trying to get our subversion configuration management repository to work with active directory. At the moment I am having a problem with some users having mixed case user names in active directory.

    Would it be possible to change all users with mixed case user names to be all lowercase instead?

    I'm using Windows Server 2003 Active Directory with 64 bit domain controller running on Windows 2000 mixed functionality.

    Thanks.

  • #2
    Re: Converting all username/alias to lowercase user names in Active directory ?

    Hi,

    This can be done easily using powershell and questad. Let me know if you can install them on one of your machines from where changes can be made.
    Thanks & Regards
    v-2nas

    MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
    Sr. Wintel Eng. (Investment Bank)
    Independent IT Consultant and Architect
    Blog: http://www.exchadtech.blogspot.com

    Show your appreciation for my help by giving reputation points

    Comment


    • #3
      Re: Converting all username/alias to lowercase user names in Active directory ?

      Originally posted by v-2nas View Post
      Hi,

      This can be done easily using powershell and questad. Let me know if you can install them on one of your machines from where changes can be made.
      yes, all of my DC got Powershell 2.0 installed and ready to go

      Comment


      • #4
        Re: Converting all username/alias to lowercase user names in Active directory ?

        Hi,

        Please install QuestAD commandlets. It's by Quest. free tool. This extends powershell functionality. once you have installed quest. launch quest console

        and here is the command
        ##################
        # Script to convert sAMAccountName from mixed case to Upper Case By v-2nas
        # v.1.0
        ##################

        Get-QADUser -SearchRoot "OU=Users,OU=TestOu,DC=MyDomain,DC=Net" | Select Name, sAMAccountName | Export-csv -path c:\temp\username.csv -NoTypeInformation

        Import-Csv c:\temp\username.csv | foreach{Set-QADUser -identity $_.Name -samAccountName ($_.sAMAccountName).ToUpper()} | Select-Object Name, samAccountName

        ##################

        You can save the file in notepad as anyName.ps1 and run it from console like this
        x:>.\anyName.ps1

        you can change the SearchRoot value to the value of our user's ou.

        Please first test on few users.

        I hope this will be helpful.
        Thanks & Regards
        v-2nas

        MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
        Sr. Wintel Eng. (Investment Bank)
        Independent IT Consultant and Architect
        Blog: http://www.exchadtech.blogspot.com

        Show your appreciation for my help by giving reputation points

        Comment


        • #5
          Re: Converting all username/alias to lowercase user names in Active directory ?

          Please first test on few users.

          I would go a bit further and suggest you test in a Lab first.
          1 1 was a racehorse.
          2 2 was 1 2.
          1 1 1 1 race 1 day,
          2 2 1 1 2

          Comment

          Working...
          X