Solved

Error message when Using Lync 2010 Powershell command

Posted on 2012-03-19
4
1,714 Views
Last Modified: 2012-08-13
Enable-CsUser : ConstraintViolationNoLeadingOrTrailingWhitespace
At C:\EnableLync.ps1:3 char:15

Here is what I'm using:

Name,Pool, SipAddress
joeSmith,lyncPool.contoso.com,sip:joeSmith@contoso.com


Here is the script

$users = import-csv C:\lync_Users.csv
foreach ($user in $users)
{Enable-CsUser –Identity $user.name –RegistrarPool $user.pool –SipAddress $user.sipaddress}


Any thougts?
0
Comment
Question by:K Anthony O365
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
172pilotSteve earned 500 total points
ID: 37739639
Looks like in your header, you have a space before "Sip Address"
0
 

Author Comment

by:K Anthony O365
ID: 37739900
No spaces anywhere

Name,Pool,SipAddress

Note the error lin below:

Enable-CsUser : ConstraintViolationNoLeadingOrTrailingWhitespace
At C:\EnableLync.ps1:3 char:15

Would this be in the script? Here is the script:

$users = import-csv C:\lync_Users.csv
foreach ($user in $users)
{Enable-CsUser –Identity $user.name –RegistrarPool $user.pool –SipAddress $user.sipaddress}
0
 

Author Closing Comment

by:K Anthony O365
ID: 37740162
Created a new csv. Worked fine.

thanks
0
 
LVL 10

Expert Comment

by:172pilotSteve
ID: 37740235
Just to make sure..  Look at your two lines..  Copied from your 2 posts:
Name,Pool, SipAddress
Name,Pool,SipAddress

See the difference?  That's the space I was referring to, and I think that's why it didn't work earlier for you..  No matter, thanks for the points, and good luck w/ Powershell - It really is an AWESOME tool!!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

632 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