If you are configuring the Federation, Remote Access, or Public IM (PIC) features for Lync users in a script (i.e. that is part of a nightly process), you might be confused by 3 potentially different methods of configuring these features:
1) Lync External Access Policies
Set with the New-CsExternalAccessPolicy cmdlet
2) Lync User Attributes
Available on the Get-CsUser Powershell cmdlet: EnabledForFederation EnabledForInternetAccess PublicNetworkEnabled
3) User AD Settings for Federation and Remote Access
msRTCSIP-FederationEnabled msRTCSIP-InternetAccessEnabled msRTCSIP-OptionFlags (contains a bitmask value which sets the PIC feature)
If you have a background administering user features in OCS, you might be tempted to reuse an existing OCS script for Lync to configure these feature . . . → Read More: Configuring User Federation, Remote Access, and Public IM in Lync