Sunday 2 December 2012

Manage features pages


For Site (Web):
/_layouts/ManageFeatures.aspx

For Site Coll (Site):
/_layouts/ManageFeatures.aspx?Scope=Site

Friday 24 August 2012

Powershell script - adds custom site column to content type (MOSS)


Used this script today to add a custom site column (Forarchive) to the core Content Type - Document

********************************************


[void][System.Reflection.Assembly]::Load("Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

[void][System.Reflection.Assembly]::Load("Microsoft.Sharepoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

[void][System.Reflection.Assembly]::Load("Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

********************************************

$url = "http:///sites/sitename/"
$site = new-object Microsoft.SharePoint.SPSite($URL)

$web = $site.RootWeb

$ct=$web.ContentTypes["Document"];
$fieldAdd=$web.Fields["ForArchive"]
$fieldLink=New-Object Microsoft.SharePoint.SPFieldLink($fieldAdd)
$ct.FieldLinks.Add($fieldLink);
$ct.Update()

$web.Dispose()
$site.Dispose()


Tuesday 8 May 2012

PowerShell script to create a new site collection in a dedicated content database

This script creates a site collection in a new content database and sets the maxsitecount to 1 - so no more site collections can be created in that content database

It prompts the user running the script to enter values that will be stored as variables:

#######################################################################


$server = Read-Host “Enter SQL Server”
"Thanks"
$dbname = Read-Host “Enter Database Name”
"Thanks"
$webapp = Read-Host “Enter Web Application URL”
"Thanks"
$site = Read-Host “Enter New Site Collection URL”
"Thanks"
$owner1 = Read-Host “Enter Primary Site Collection Admin”
"Thanks"
$owner2 = Read-Host “Enter Secondary Site Collection Admin” 
"Thanks"
New-SPContentDatabase -Name $dbname -DatabaseServer $server -WebApplication $webapp -MaxSiteCount 1 -WarningSiteCount 0
New-SPSite -URL $site -OwnerAlias $owner1 -SecondaryOwnerAlias $owner2 -ContentDatabase $dbname

#########################################################################



Output: Here I ran the script using the full file path - note the additional info displayed

























That's all for now

Friday 4 May 2012

A Guide to using the SP2010 Records Centre - Part 1


A Guide to using the SP2010 Records Centre - Part 1

  • Using the FilePlan to create content types in the Content type hub site
  • configuring Doc libraries for records management
  • creating records libraries in the Records centre
  • Creating folders in the Records Centre
  • Routing records using Content organizer
  • Sending records to the Records centre from a Doc Library
  • Setting retention policies in the Records Centre


Using the FilePlan to create content types in the Content type hub site


Navigate to the Content Type Hub site: 



Go to Site Actions Site Settings Galleries Site Content Types:






In this example we are going to add the following section from the FilePlan as Content Types:

. Community support
. . Day centres
. . Groups

To do so - Click create:




Content Types are hierarchical – Child content types inherit from the parent

We are going to create a new Content Type called Community support which will inherit from the Document Content type. We will put this new Content Type into a new group called Community support



Click save and navigate back to the site content gallery. The new content type appears in the new group as below:


 


Now use the same process to create the 2 child content types using Community Support as the Parent: E.g.




Now the Content Type gallery displays all the new content types in the new group and their parent content types:




Finally it is necessary to publish the content types

Select the Community Support Content Type and select Manage publishing for this Content Type:




Ensure Publish is selected and click OK:



A timer job within SharePoint will publish the Content Type and this runs hourly

Configuring Doc libraries for records management


Next stop - the records centre

Go to Site Actions More Options

Select to Filter by Library and select Records Library



Name it Community Support and click Create:

The new Records library now appears in the Quick launch of the Records Centre:



Now we’ll open the new library, select the Document tab and create 2 folders using the New Folder button. These will be used to hold the child content types

The library now looks like this:



That's it for Part 1




Wednesday 2 May 2012

Implementing and Configuring a Records Centre in SP2010 - for SharePoint Administrators



Begin by defining the content types that will be used to classify records throughout your enterprise
  1. Create content types at the enterprise level using the Managed Metadata Service
  2. Create a new Web application and use the Records Centre template for the site collection.
  3. Create a records library in the Records Centre for each content type.
  4. Define required metadata on the document libraries or content types.
  5. Define Information Management Policies to implement the File Plan rules.
  6. Create content organizer rules to route documents to the correct records library.

Creating and Managing Content Types


What are Content Types and why are they important?


A content type is a reusable collection of settings that can be applied to a document to categorize its content. Content types are essential to the proper functioning of your Records Centre because documents submitted to the Records Centre are automatically organized by content type

Content Types and the File Plan


For every record type in your file plan, create a corresponding content type that users can apply to documents

Content Types and Inheritance


Content types support inheritance. This allows you to base a new content type on an existing content type. In this way you can define a single content type with specific attributes and create a derived content type based on it

For example:

The Financial Statement and Fiscal Report content types might be two subtypes of the parent type Finance Document, created to distinguish two specific types of documents in the same general category. Each type could then be routed into a different records library in the Records Centre or they could be grouped together

The Records Centre


Records Centre + Content Types + File Plan


The Records Centre site is used in conjunction with content types in SharePoint 2010 to implement the file plan.

How are Records submitted to the Record Centre?


Records are added to the Record Centre using the Submit A Record button on the home page or using a farm-wide Send To Records Centre option

What happens to records when they arrive at the Records Centre?


When a record is sent to the Records Centre, it is placed in the Drop Off Library until the Content Organizer rules are assessed, at which point, if there is a destination available based on content type or metadata, it is sent to that records library.
If there is not a Content Organizer rule for the document, it will remain in the Drop Off Library until a records manager determines where the record should be placed.
The document can be routed to the correct location by locating the document in the Drop Off Library and then populating the properties required by a Content Organizer rule that will route it to the appropriate location

Creating Records Libraries

·         Each library can hold one type of file or many different types
·         Files will be automatically routed into the records libraries based on the locations you configure in the Content Organizer list
·         You can create folders within records libraries, and they can be used as destination locations in the Content Organizer rules
·         Folders can be created automatically based on property values associated with the documents being routed, allowing the routing not to be based solely on content type
·         Major versioning is automatically turned on when libraries are created in the Records Centre – can be customized

Defining the required metadata

You can create additional columns (metadata) in the records library to track metadata that is required by your file plan but was not present on the original document.
For example, you may want to assign a tracking number to the file that is generated by an external document tracking system. The user would then be prompted for this number when sending the document to the repository - the user is presented with the Missing Properties page to provide the missing values.
If the user fails to provide any required values or cancels the Missing Properties page, then the file is still copied to the Records Centre, but it is placed in the Drop Off Library

Applying Information Management Policies

·         Each of the records libraries will have information management policies applied to them to enforce the file plan distributed earlier
·         You can either apply one policy for the entire records library or, if you configure the records library to allow multiple content types, then you can apply a separate policy to each content type

 

Creating Content Organizer rules

At this point, you want to create the Content Organizer rules based on either content types or metadata to control where the document will reside in the Records Centre.
If you are specifying more than one property to determine where to route the document, all property values must be met to ensure proper routing.
If you are using content types, you must define what library you want to receive the document.
Regardless of what rules are used to route the document, all the records library information management policies are applied to the document after it is placed in the records library

Placing a Hold on Records

The Records Centre site contains a Holds option that is used to place policy locks on sets of documents in the Records Centre, preventing them from expiring or being deleted while on hold.
When an item is placed on hold, all automated expiration policies are suspended for that item and users are prevented from deleting the item.
Creating a hold involves creating a new item in the Holds list, which can be completed by performing a search using the Search And Add To Hold page
Alternatively, you can also locate the record in the Records Center, hover over the title of the document until you see an arrow, and then click Compliance Details to present the Compliance Details page. Click the Add/Remove From Hold link and specify the name of the hold. You can use these same steps to remove the hold



Monday 30 April 2012

Change the location of the IIS log files - IIS7

At some point - you'll need to stop IIS logging to the C:\

Open the SharePoint 2010 Management Shell
 The IIS snap-in first needs to be loaded using Import-Module WebAdministration

 Here is the command to change the log file directory for the default web site:

Set-ItemProperty 'IIS:\Sites\Default Web Site' -name logFile.directory -value 'D:\IISLogs'
Now, open up the IIS Manager console, expand Sites, click on the site you changed the log directory for and double click on Logging under the IIS section. You should see the new directory location under Log File

 You will need to perform this on each server in the farm.

User profile properties Diagram



SQL for SharePoint Administrators

SANs and LUNs
· SAN configurations affect performance. Nowhere is that more important than with SQL Server. Every document, every list item, every search result, and every user profile is delivered out of a SQL Server database. If those databases are on a slow drive, then SQL Server is slow. If SQL Server is slow, then no amount of configuration trickery can make SharePoint fast. SQL Server really is that important
· The (virtualized) Production farm should have the best-performing LUNs that the SAN can provide
· Ideally, place the tempdb database, content databases, Usage database, search databases, and SQL
Server 2008 transaction logs on separate physical hard disks/LUNs/SAN drive
· Is the search index on a super fast SAN drive? Currently on D:\
· When prioritizing data among faster disks, best practice is to use the following ranking:
1. Tempdb data files and transaction logs
2. Database transaction log files
3. Search databases, except for the Search administration database -
4. Database data files
Optimization
· Limit the content database size to 100GB; use multiple content databases if necessary.
o 100GB is a soft limit imposed by backup times
o DBs are supported up to 200GB
· Create multiple data files and spread them across multiple disks; only create files in the
primary filegroup
· The number of data files should be less than or equal to the number of core CPUs; count dual
core processors as two CPUs; count each processor that supports hyper-threading as one CPU
· Create data files of equal size
Backups of Content DBs
· Governance policy required: e.g. Sites are backed up daily and recoverable up to 14 days
o How far back are sites recoverable now?
o How long do current backups take?
Planning content DBs

Myportal
o Content DB Name: SP_myPortal_CDB
o Read-only: No
o Site collections: 15
o Warning:2000
o Max:5000
Mysite
o Content DB Name: SP_MySite_CDB
o Read-only: No
o Site Collections: 60
o Warning:2000
o Max:5000
· The preferred way for creating databases is to have the DBA pre-create them so that you can just reference the database names when you configure your farm, or create service or web applications.
o The goal is to have the databases available ahead of time, complete with all the settings required by SharePoint
· When SharePoint creates its multitudes of databases, it makes assumptions. E.g. the autogrow settings:
o The database files grow by 1MB at a chunk, almost ensuring that they're going to autogrow with every upload. Not only does this slow down SQL Server (which slows down SharePoint), but it also results in database files that are spread all over your drives in 1MB chunks
o Best practice - Set autogrow to 500MB/1GB
o Autogrow should also be a last resort. Someone, either the SharePoint administrator or a dedicated DBA, should pregrow your databases so that autogrow is unnecessary.
· Recovery model setting needs to be consistent with your disaster recovery plans.
o Do we need transaction logs? If so make sure we're performing routine log backups to keep those .ldf files in check.
o If we don't need transaction logs, switch the databases to the simple recovery model. Doing so will keep your .ldf files from swelling up
· SharePoint only really cares about the Collation, which should be LATIN1_General_CI_AS_KS_WS. Growth settings, file locations and the like are configured at your own discretion. Naturally, you should figure them out when planning your deployment, taking into account the fact that content databases will grow larger (and more quickly) than configuration databases, and that databases for Search can experience some heavy hits in large environments
How is Content DB growth being monitored?
o Web applications are not restricted to a single content database, which means that you can spread site collections within that web application over multiple content databases, keeping them manageable from a backup point of view
o If we have 3 Content DBs - at what point do we need to make another? What is the process for adding a new content DB?
o Limiting DB size will improve manageability, performance, and ease of upgrade for the environment
· Capacity notes
· MS recommends a maximum of 300 content databases per web application in your farm
· MS recommends a maximum of 200 GB of content per content database
· MS recommends site collections be no more than 100 GB in size
· SharePoint's only disk requirement is an 80GB system drive
o SharePoint itself doesn't need much disk space: It uses about 1GB, excluding logs, search index files, and any custom solutions. But that disk also needs to hold Windows and all its associated patches for the next few years. And the disk needs enough space for SharePoint's logs, plus enough space to perform a memory dump in the unlikely event of a problem. Also, NTFS gets fussy when disks are more than 90-percent full, so leave enough space for some overhead, too.
o SharePoint requires at least 80GB, but sometimes that isn't enough. If a SAN is hosting your SharePoint drives, expanding that 80GB system drive to, say, 120GB is painless

Sunday 29 April 2012

Rebuilding a new mysite host


Had a situation the other day where MySites went down - users were only getting 404s.

IE - unchecked show friendly http messages and this was the error:

HTTP/1.1 200 OK Server: Microsoft-IIS/7.5 Error -

I then discovered that the MySite host site collection was missing - no longer listed in view all site collections where it should have been listed as mysite.domain.com/

Googling has revealed to me that you get this error message when the root site collection is missing from the Web App

First step: detached and reattached the mysite content db from the farm - required to clear any entries in the Config DB

Second step: recreated the MySite on the root

And all is well again

The reason the MySite host got deleted was because I setup auto site deletion policy on the MySite web app - all good governance but the problem was that the MySite host site collection site admins were a couple of service accounts with no email addresses - hence instead of 28 days of warning emails - BAM! - the site just got vapourized

Lesson - make sure you can access your MySite host

Monday 16 April 2012

Metadata and Content Types in SharePoint 2010

Metadata

When you create/upload a document you may be prompted to enter some additional information

How much and what types will vary depending on how the Team Site has been set up

For Example: In this case when the document is uploaded the user is prompted to enter a title for the document, select a project and select a SharePoint category






















The user enters the title, selects a Project and then clicks the browse button next to the SharePoint category field

The user then selects from the available fields:

























Now the document appears in the document library and the Title, Project and SharePoint Category columns are displayed containing the metadata








Metadata just enables you to look quickly at content and determine what it is.

MANDATORY metadata fields are marked by a RED asterisk (*)

To Edit Metadata

(a) Click tick box alongside document 
(b) Choose Documents Tab
(c) From Manage Tab, click on Edit Properties
(d) Amend metadata as appropriate
(e) Click Save to save the metadata changes

To View the Metadata

(a) Click into the tick box alongside the document
(b) On the Documents Tab, in the Manager Group, click on View Properties
(c) The Metadata screen will be displayed

Content Types

When you create a new document from the New button in a document library – the dropdown may contain a selection of templates – these are called Content Types

By default SharePoint creates one Content Type for a Document Library – called Documents

In the case below the Team Site Owner or Administrator has created 3 more:





















Ensure when creating new documents that you are using the correct Content Type. Each Content Type may have different metadata associated with it. Workflows and retention policies may also be mapped to Content Types

SharePoint Information Architecture Diagram

Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...