We help IT Professionals succeed at work.
Get Started

Enable user for Lync if not already

Last Modified: 2015-07-23

This should be relatively simple, but I'm drawing a blank from my searches.  If possible, can someone point me in the right direction on how to handle PS negative returns?

This is in regards to Lync, where I need to execute the following:

Enable-CSUser –identity “sAMAccountName” –RegistrarPool “SpecifiedPool” –sipAddressType EmailAddress

But, I need to add it in the "fail" portion of "Get-CSUser".  Basically, if a user isn't enabled, to go ahead and do it.

Thanks for any assistance that can be provided.  Apologies for the basic question, I've searched quite a bit for this, but keep coming back empty.
Watch Question
Senior Solution Architect
Most Valuable Expert 2015
Top Expert 2015
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE