Avatar of usslindstrom
usslindstrom
Flag for Japan asked on

Enable user for Lync if not already

Experts,

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.
PowershellChat / IMMicrosoft Applications

Avatar of undefined
Last Comment
usslindstrom

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Will Szymkowski

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
usslindstrom

ASKER
This solution worked out perfect for us.  Thank you sir!

Apologies in delay in closing this question.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23