Bulk Modify Attributes

stavros mitchell 56 Reputation points
2020-08-24T20:54:27.557+00:00

Hell Everyone i created an excel sheet to bulk update some attributes for example Display Name , UPN, Addres , Office Number , Mobile Number, country , city, title, company.

But i cannot seem to get a powershell command to work. Would anyone have any suggestions

thanks

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,997 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,407 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,111 Reputation points
    2020-08-24T21:21:56.623+00:00

    What command?

    Post the script you're using.

    I think you'd be better off using a CSV file (just export the contents of the Excel file) than dealing with Excel automation to get the data.

    Something like this can be used as a model:

    import-csv <your-file-name-here> |
        ForEach-Object{
            $ReplaceParams = @{
                DisplayName = $_."Display Name"
                UPN = $_.UPN
                etc.
                etc.
            }
            Set-ADUser -Identity $_.Identity -Replace $ReplaceParams
        }