Friday, September 12, 2014

Expiration Policy on items


Sharepoint 2010
Steps to set an expiration policy into Sharepoint document library, i find it very useful for IT people to set a policy for each document library,
p.s.: This will work if you have SharePoint Standard or Enterprise edition.
  1. Go To your Sharepoint Root webapplication, then in Site settings--> SiteCollection Administration--> Site Collection Policies -->
  2. Define a new policy
  3. Go to Central Administration --> http://CENTRALADMINISTRATION_URL/_admin/ServiceJobDefinitions.aspx
  4. We have 2 timer jobs to activate by order: 
  • 1: Information Management Policy 
  • 2: Expiration Policy
Now, you can add the policy stated at step 2, on your document library, how? let's see

If we want to set expiration date in a content type policy
 
1. This will work if you have SharePoint Standard or Enterprise edition. Open your site in a browser.
2. Select "Site Actions > Site Settings".
3. Click "Go to top level site settings". Of course, you don't see this link if you are already on the top level site.
4. Click "Site content types" under "Galleries".
5. Locate the content type that you want to use for setting the policy on. Click the link of the content type.
6. Click "Information management policy settings" under "Settings".


7. Select "Define a policy..." option and click OK.





Fig 2: Define a policy
8. Check "Enable Expiration" checkbox. Select "Created" or "Modified" in the item's properties and select days, months or years from the last drop down in the row. Enter a number in the middle text box. Now select action. You can choose the default action "Delete" or you can start a workflow and do custom actions. Click OK to save the settings.



Hope this will help someone. It is straight forward but I have seen users asking this question "How to set expiration policy on a content type".

Friday, September 5, 2014

Exclude Disabled Accounts Users from profile Synchronisation

Problem:
 If you have noticed that disabled users in Active Directory AD in your company are still showing up in the sync, you would like may be to update the sync so that it only pulls in active users.

Answer:
The userAccountControl attribute is used to store the account options for an AD user object. These options include the status of the account (e.g. disabled, or locked out). Each option is a property flag. These flags are cumulative and thus there is only ever one value for userAccountControl.

Therefore it makes sense to create an exclusion filter to avoid synchronizing disabled accounts and so on. This one is easy and finds it’s way into most documentation such as the very good Configure profile synchronization. However, it is a bit more tricky when dealing with other property flags and combinations of them. 
Now, for the steps,

 
  1. Go to your Central Admin website
  2. Go to "Application Management"
  3. Go to "Service Applications -> Manage Service Applications"
  4. Click on "User Profile Service Application"
  5. Click on "Synchronization -> Configure Synchronization Connections"
  6. Click on your connection and select "Edit Connection Filters" from the menu
  7. Add a new Exclusion Filter for Users and select "userAccountControl" as the attribute, "Bit on equals" as the operator, and "2" as the filter. Make sure also that you correctly have AND and OR selected if there are any other exclusion filters already there.
    userAccountControl Bit on Equals 2
  8. Click "OK"
The next time that it syncs your disabled accounts should be gone.