Auto Enabling Lync 2010 - Query - Help

Hello Team

In my test environment am using this script taken from this website(Googled and found )

http://lyncdirector.blogspot.in/

This scripts run in each 60 Min across this domain in AD. if any account found Lync disabled, or not enabled , it will automatically enabled once the script ran or completed.

now I have a problem , I would like to disable few users from the Lync server permanently and I don't want to enable further

if I disable the Lync account in LCP and it keeps enabling automatically enabled once the script ran.

How can I over come this? and would like to modify the script with exception. please help

Thanks in Advance

August 21st, 2013 11:09am

You could create an OU for disabled account and modify the get-ADOrganizationalUnit in the script.

  1. Create an OU called Lync Disabled Accounts
  2. Move disabled users to New OU
  3. Modify Script line in enable.ps1 : 
  • Old Line:       $ouname=Get-ADOrganizationalUnit -filter * | select-object -property Name;
  • New Liine:     $ouname=Get-ADOrganizationalUnit -ldapfilter "(!name=Lync Disabled Accounts)" | select-object -property Name;


Free Windows Admin Tool Kit Click here and download it now
August 21st, 2013 1:39pm

Thanks Mate.

Do you want to add the new or replace the old with new line...

August 22nd, 2013 3:08am

Replace the old line with the new line.
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2013 8:09am

Wonderfull.

Works perfectly. Thanks to all

August 22nd, 2013 10:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics