Showing posts with label office 365 update user powershell. Show all posts
Showing posts with label office 365 update user powershell. Show all posts

Friday 18 October 2019

How to bulk update user's manager from import CSV in O365?


Or, updating the bulk user's manager in O365 using CSV file

Steps/Prerequisites:
- Make sure you are corrected with O365 PowerShell session.
- Make sure you have exported Managers list in CSV format using the KB How to export user's managers in O365?

To update the user’s manager execute the below commands:

--------------------------------------------------------------------------------------------------------
$users = Import-Csv -Path "C:\manager.csv"
foreach($i in $users)
{
Set-User -Identity $i.UserprincipalName -Manager $i.Manager
}
---------------------------------------------------------------------------------------------------------

Note: Choose your correct file name and file path in the above-given command

Cheers, please write me back if you have any query or feedback.

Sunday 17 December 2017

Update multiple user’s profiles in O365 using PowerShell

Or, Updating bulk user’s job title, phone, title, email ID etc... In O365 using PowerShell
Or, How to update user’s profile in O365 using PowerShell with csv import function?

Descriptions: This is one of the very common task that you may be doing on very frequent intervals. Generally when promotions or appraisal are announced in an organization, the Exchange server administrator and AD administrators are requested to update the user’s profiles as per the current designation, extension, department etc...
If you are looking for PowerShell command to update user’s profiles in bulk, you are at the right place and you may refer the steps below.

Steps:
Connect to Microsoft Azure AD > Open Windows PowerShell (Run as Administrator) > Type the command below and hit Enter

Connect-MsolService

Once you have the sign-in pop, please feed in your O365 credentials
















Feed in all the info as per your requirement in a CSV file, as reference shown below.






Run below command now and hit Enter
$users = Import-Csv 'D:\temp\UsersInfoUpdate\profileupdate1.csv'

Now run below command to update all the details you have selected
$users | ForEach-Object { Set-MsolUser -UserPrincipalName $_.Email -Title $_.Jobtitle -PhoneNumber $_.OfficePhone -MobilePhone $_.MobilePhone }

Reference screenshot of PowerShell command execution with all commands in sequence:





Cheers, Please write me back if you have any query or feedback on this…