Solved

Setting Lync LineURI for users from a CSV file

Posted on 2013-05-11
3
1,155 Views
Last Modified: 2013-05-16
Good day,

I am trying to set the LineURI for a large number of MS Lync Users without modifying each user account.  I have the users in a CSV file with the appropriate information.  I will attach a sample of the file.  I know the following command will allow me to enable them for voice but how do I set the remaining attribute as well.  Any suggestions?

Import-CSV "C:\lyncusers.csv" | ForEach-Object{set-csuser -Identity{Set-CsUser –Identity $_.User –EnterpriseVoiceEnabled $True}

Lyncusers.csv
0
Comment
Question by:bullfrog264
  • 2
3 Comments
 
LVL 1

Author Comment

by:bullfrog264
ID: 39158662
So I answered my own question I suppose.  I was using DisplayName and had misspelled LineURI so this command wasn't working.  I corrected those two items and all is well.  I figured I would share for other people to use.

Import-CSV "C:\lyncusers.csv" | ForEach-Object {Set-CsUser -Identity $._DisplayName -EnterpriseVoiceEnabled $True -LineURI $._LineURI}
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39164160
FYI.. There is a small typo in your code.. :-)
$._LineURI should change to $_.LineURI
$._DisplayName should change to $_.DisplayName
Import-CSV "C:\lyncusers.csv" | % {Set-CsUser $_.DisplayName -EnterpriseVoiceEnabled $True -LineURI $_.LineURI}

Open in new window

0
 
LVL 1

Author Closing Comment

by:bullfrog264
ID: 39171073
Thanks Subsun....I am having typing issues today.  I did type the command properly when I ran it if that counts for anything! haha!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question