Solved

Error message when Using Lync 2010 Powershell command

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

786 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