SOLVED

Teams user info automation

Brass Contributor

I am hoping someone can provide me with some info.

 

I want to be able to run a script that allows me to assign the following to multiple users replacing each user identity and tel number with what ever is assigned in one go.

 

Set-CsUser -Identity User@*****.co.uk -EnterpriseVoiceEnabled $true -OnPremLineURI tel:********

 

I am assuming i will need a .csv file but how would I then set out the csv to input the correct data?

 

Noob question... sorry... :)

 

 

 

 

 

 

 

 

1 Reply
best response confirmed by WelshViking (Brass Contributor)
Solution

Assuming you have a blabla.csv with the Identity column designating the user and the Telephone column designating the number, this should do:

 

Import-CSV blabla.csv | % { Set-CsUser -Identity $_.Identity -EnterpriseVoiceEnabled $true -OnPremLineURI $_.Telephone }
1 best response

Accepted Solutions
best response confirmed by WelshViking (Brass Contributor)
Solution

Assuming you have a blabla.csv with the Identity column designating the user and the Telephone column designating the number, this should do:

 

Import-CSV blabla.csv | % { Set-CsUser -Identity $_.Identity -EnterpriseVoiceEnabled $true -OnPremLineURI $_.Telephone }

View solution in original post