Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1291
  • Last Modified:

Setting Lync LineURI for users from a CSV file

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
bullfrog264
Asked:
bullfrog264
  • 2
1 Solution
 
bullfrog264Author Commented:
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
 
SubsunCommented:
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
 
bullfrog264Author Commented:
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

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now