Solved

Error message when Using Lync 2010 Powershell command

Posted on 2012-03-19
4
1,659 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
  • 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
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…

821 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