Service Pack 1 for SharePoint 2010 Products is Now Available for Download‏

Let the good times roll…

http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=984

Some of the much awaited features:

Site Recycle Bin

  • Service Pack 1 will introduce long awaited Site Recycle Bin functionality that enables self-service recovery of site collections and sites.

Shallow Copy

  • If you’re using Remote BLOB Storage you’ve probably realized that when moving Site Collections (Move-SPSite) between content databases each unit of unstructured data (BLOB) was round tripped (I.e. uploaded and subsequently downloaded again) serially during the move.

StorMan.aspx

  • In Service Pack 1 we are bringing back an improved StorMan.aspx, enabling users to better understand where their quota is going and act upon that information to reduce the size of their sites.

SharePoint 2010–Powershell to determine Database Sizes in Farm

Earlier I wrote about how to use Powershell to dump out the Site Collection Storage Usage for a Farm, and this works well for when you want to analyze your farm usage in terms of capacity management and being able to manage your Site Collections, but one of the other key areas of SharePoint operations is to backup those site collections and know that you’ve got enough space for your backups and restores.  In this case you’ll want to become familiar with a couple different PowerShell commandlets, Get-SPContentDatabase (for only content databases) and Get-SPDatabase (for all databases in the farm).

The first step is to grab a database and pipe it through the Get-Method in order to explore what items are available to us:

$db = GetSPContentDatabase WSS_Content

$db | Get-Method

And again we’ll get a nice list of objects in the $db

TypeName: Microsoft.SharePoint.Administration.SPContentDatabase

Name                                MemberType    Definition
—-                                ———-    ———-
Type                                AliasProperty Type = TypeName
AddBackupObjects                    Method        System.Void AddBackupObjects(Microsoft.SharePoint.Administration.B…
AddFailoverServiceInstance          Method        System.Void AddFailoverServiceInstance(string failoverServerInstance)
ChangeDatabaseInstance              Method        System.Void ChangeDatabaseInstance(string databaseServiceInstance)…
Clone                               Method        System.Object Clone()
Delete                              Method        System.Void Delete()

DiskSizeRequired                    Property      System.UInt64 DiskSizeRequired {get;}

Username                            Property      System.String Username {get;set;}
Version                             Property      System.Int64 Version {get;}
WarningSiteCount                    Property      System.Int32 WarningSiteCount {get;set;}
WebApplication                      Property      Microsoft.SharePoint.Administration.SPWebApplication WebApplicatio…

Now, from here we know we’re going to use the Get-SPDatabase in combination with the DiskSizeRequired property to list out all the database in the farm and what their sizes are in MB:

Get-SPDatabase | select name, @{label = "Size";Ex = {$_.disksizerequired/1MB}}

And that will give us a nice listing of the databases in the farm and what their sizes are:

StateService_df20cdbfe7924603acb8e40a3f092610                                                                       514
Secure_Store_Service_DB_95a60957097147eb9abcb43933ec7b53                                                            514
WordAutomationServices_d87bdc383c60493bb47261ace4bb55b0                                                             513
SharePoint_SocialDB                                                                                                 516
Bdc_Service_DB_8fb8f804e77e441d86cea9a2e9a2c5e6                                                                     515
WebAnalyticsServiceApplication_StagingDB_8cae3fa4-a0b1-4…                                                         849
SharePoint_Config                                                                                                  2537
PerformancePoint Service Application_da9632c7c3d64ee299f…                                                         513
FAST_Content_SSA_CrawlStoreDB_a5ebd4c681334fc58b910003f8…                                                        4537
Fast_Query_SSA_CrawlStoreDB_863e0102aa56484fb8a3cc5bb98f…                                                         931
FAST_Content_SSA_PropertyStoreDB_5786a7dfbd504b879c2f0cb…                                                         520

At this point I could stop and bring up calc to add up the row of columns, but as a developer we’re supposed to be lazy by nature, why do something the computer can do for us?  So how do we take each database object and sum up the DiskSizeRequired property so we can get the total footprint of all databases in the farm?  Turns out it’s pretty easy thanks to the ForEach-Object which allows us to set up a loop to run through all of our databases that we pipe into it:

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " – " + $_.disksizerequired/1MB} {Write-Host "`n`nTotal Size: " ("{0:n0} MB" -f ($db/1MB))}

SharePoint 2010–RSS Feeds

By now, everyone is probably familiar with the RSS icon…

image

RSS has a couple definitions… originally called RDF Site Summary or Rich Site Summary, eventually everyone started calling it “Really Simple Syndication”.  If you really want to get technical you can read all the latest specifications at the RSS Advisory board site here: http://www.rssboard.org/rss-specification

RSS feeds benefit publishers by letting them syndicate content automatically. A standardized XML file format allows the information to be published once and viewed by many different programs. They benefit readers who want to subscribe to timely updates from favorite websites or to aggregate feeds from many sites into one place.

Also very useful when you want to add fresh content to your own website by pulling from another site’s RSS feed and displaying the information to your viewers!  Updated content without the hassle of writing it.

Generally there are two types of RSS Feed: Internal or External.

Implementation:

Internal RSS Feed Web Part:

Any RSS Feed link (xml) which is hosted inside a company intranet is categorized as a RSS Feed internal link. SharePoint servers’ security can be configured in two ways: Kerberos or NTLM.

If Kerberos authentication in configured (enabled) on your SharePoint server then you can use an out of the box RSSViewer Web Part to render an RSS feed coming from the internal RSS feed link. To enable Kerberos authentication on SharePoint 2010, follow the Microsoft whitepaper which you can download here: Configuring Kerberos Authentication for Microsoft SharePoint 2010 Products

If you are using NTLM authentication and you try to configure the RSS view webpart with an internal RSS feed link, it will throw an error like this:

“The RSS Web Part does not support authenticated feeds.”

Because this is fairly common to want, several RSS Reader WebParts have shown up on CodePlex, as well as third party components.

http://wssrssreader.codeplex.com/site/search?query=rss%20reader%20sharepoint

Or otherwise, if your web site’s security permits, then give anonymous access to the underlying list/library.

External RSS Feed Web Part:

Any RSS feed link which is hosted on the internet (e.g. ieDaddy Post Feed is called an External RSS Feed. Normally External RSS feed links don’t work as-is on Company Intranet sites, since they use proxy servers to connect to the internet. In that case use the following link to enable an external RSS feed in your environment.  Easy enough to get around by changing the web.config of your web app with the following lines of XML:

   <system.net>
      <defaultProxy>
         <proxy usesystemdefault="false" proxyaddress="http://proxyname" bypassonlocal="true" />
      </defaultProxy>
   </system.net>

There are some scenarios where you need to embed RSS feed code inside a page/page layout /master page and outside a web part zone. In that case, the RSS viewer OOB web part will not work. The RSSaggregator tag is not recognizable outside a web part zone. In that case, use a Data View Web Part. Create a Data Source of type “Server side scripts” and connect that to an XML RSS feed link. The you can copy the Data View Web Part code and place it at an appropriate place in your page/page layout/master page.

Additionally, there are several JavaScript renditions of an RSS reader out there that you can literally copy and paste into our friendly CEWP. 

SharePoint 2010 | Using DataFormWebPart to Display File Attachments

Creating a site for a business unit and they wanted to display an attachments link for certain list items in a custom built DataFormWebPart.  Seemed pretty straightforward to just add the attachment column to the DataFormWebPart, however when rendered it was a yes/no value, not very useful as we don’t care IF there is an attachment, we want the link to the attachment.

So instead of this column, we can crack open the XSL Editor and the following to our DataFormWebPart to display the attachment button:

<SharePoint:AttachmentButton ControlMode="Edit" Enabled="true" ItemId="{@ID}" runat="server" Visible="false"/>
 <SharePoint:AttachmentsField ControlMode="Display" ItemId="{@ID}" EnableViewState="true" FieldName="Attachments" runat="server"/>