Forum Discussion

Andy Kw's avatar
Andy Kw
Brass Contributor
Jan 31, 2018
Solved

How to load managers for differents users from a csv file on Office 365 through Powershell?

Hi, I'm trying to update through powershell, the line managers,  which are in a csv format , of all the employees working in our company. I know how to do it manually (see the 4 steps below)  ...
  • VasilMichev's avatar
    Jan 31, 2018

    It's a very simple task, all you need to do is use the Set-User cmdlet against the CSV file. For example:

     

    Import-CSV blabla.csv | % { Set-User $_.UserPrincipalName -Manager $_.Manager }

     

    where it is assumed that you have the blabla.csv file with column UserPrincipalName, uniquely designating the user, and column Manager.

Resources