Lync 2010 Client Policy Explained

In this article, I will be explaining the client policies in Lync Server 2010 – types of policies, how to create & apply policies to users. First of all, almost all the settings around Lync client is controlled by the client policy defined on the Lync server. The group policy settings that you were used…

In this article, I will be explaining the client policies in Lync Server 2010 – types of policies, how to create & apply policies to users.

First of all, almost all the settings around Lync client is controlled by the client policy defined on the Lync server. The group policy settings that you were used to in the OCS world is all part of the Lync client policies now.

There are three levels at which a client policy is applied – Global, Site and User level. By default, a global level policy is defined out of the box for Lync 2010. There are no site or user level policies in a default installation of Lync server. Running Get-CsClientPolicy shows you the global policy settings.

Global Client Policy

I haven’t created any site or user level policies in my lab yet. Running Get-CsUser –identity “user” | fl clientpolicy outputs the client policy applied to the user.

Client policy applied to a user

Ohh! That wasn’t the output that you expected, is it? Why is it that the client policy shows blank? Is it because that I don’t have any site/user level policies configured? The answer is no. Even if you don’t have any policies configured, you are always bound by the global policy. The reason why the entry is blank is because the command (Get-CsUser) doesn’t actually output the “effective” policy applied it, in this case the global policy. The command will only output user level policies (if defined). Site or global policies (even when applied) will be shown as blank. Use this script if you want to output the policy applied, even if they are global or site level ones.

If you have a user policy configured, the command will show that though! Let us try. Running New-CsClientPolicy “Policy Name” will create a new user policy. We are not bothered about the policy settings in this article.

New Client Policy

Running Get-CsClientPolicy | fl identity shows that we have both global and the new policy in place.

Both policies shown

In order to apply this new policy to the user, run Grant-CsClientPolicy –identity “user” –PolicyName “policy name”.

Grant client policy to user

Running Get-CsUser “user” | fl clientpolicy confirms that we have the policy applied.

Confirm policy applied

Run Grant-CsClientPolicy –identity “user” –PolicyName $null if you want to remove the user policy. You will still have a site or global level policy applied.

Remove client policy

Hope this gives you an idea to play with the client policies in Lync Winking smile

8 Comments

  1. Hi Rajith,

    I have question regarding retrieving policy assigned to user.
    I know i can do it using Get-CsClientPolicy | fl identity this command.
    But the above command gives output after 1 line space.
    For e.g. Get-CsClientPolicy | fl username

    Policyname (outout of above command)

    Because of extra space I am not able to retrieve name in my CS file.
    I have written a code in c# file to retrieve it and accesing using PSobject.
    For e.g.
    if (po.Count > 0)
    {
    Console.Write(” Coming 1 :”);
    foreach (PSObject poResult in po)
    {

    // re = (string)poResult.ImmediateBaseObject;
    Console.Write(“\n poresult is “+poResult.Properties.ToString());
    Console.Write(“\n re is: ” + re);

    }

    }
    I want to have command which returns policy name without extra space.

    Thanks in advance.

  2. yashvardahn says:

    I mean from control panel i can’t see my new added policy and user’s ..is it ok

    1. Rajith Enchiparambil says:

      HI Yashvardhan,

      You should be able to see the policy through Lync Control Panel as well. Did you create a new client policy and apply it to the mailbox? Does Shell show the new policy?

  3. yashvardahn says:

    BUT i AM unable to see my new user based policy and user i have added through shell command. fromshell it showing my new policy.

  4. Hello Rajith

    Yes you are right i was running this on normal PH instead of the server Lync shell

    My bad

    1. Rajith Enchiparambil says:

      Happy to help out Gabi.

  5. Hello Rajith

    I am very new to this one i am trying to learn a few things, but just from the start i got into trouble.
    I run the command to check what i have and got the below error
    =================
    PS C:\> Get-CsClientPolicy | fl identity
    The term ‘Get-CsClientPolicy’ is not recognized as the name of a cmdlet, function, script file, or operable
    ==================
    What am i doing wrong?
    Thanks Gabi

    1. Rajith Enchiparambil says:

      Hi Gabi,

      Are you running this command on the Lync Management Shell? I have a feeling that you are running it on the normal PowerShell.

Leave a Reply

Your email address will not be published. Required fields are marked *