Tag Archives: Microsoft

Force A Tape To Be Free In System Center Data Protection Manager

If you need to force a tape to be free when you’re using System Center Data Protection Manager you can use the PowerShell script ForceFree-Tape.ps1.  The syntax of this command had me stuck for a while, so here’s a post to explain it.

  • Run the DPM Management Shell as an administrator.
  • Enter ForceFree-Tape.ps1.
  • Enter the DPM server name.
  • Enter the library name.  There’s no need to add speech marks for spaces in the name.
  • Here’s the bit that got me stuck.  Enter the location of the tape to be force free as slot-x, where x is the slot number of the tape you wish to erase.  Press enter and repeat the process for multiple slots.
  • When you’ve entered the location of the slots you wish to force free press Enter again.

DPM Tape Free






Restricting Access To Document Version History In SharePoint 2013

Using the Restricted Read permission in SharePoint 2013 it’s possible to prevent access to historical versions of documents, but it doesn’t work how I expected it to.

To enable the Restricted Read permission within a document library choose Library Settings from the ribbon.  Next click Permissions for this document library.  Tick the box next to the group for which you wish to enable Restricted Read and click Edit User Permissions from the ribbon.


On the screen that loads untick Read and tick Restricted Read.  Click OK to close.



This is where things don’t work as I expected.  I expected that when accessing the document library, the Version History option would be removed from the document properties menu, or the version history would only show the latest version.  However, when a user with Restricted Read attempts to open the document library from Site Contents they receive the error “Sorry, this site hasn’t been shared with you.”


Restricted Read is described as providing view access to documents.  It turns out that this is possible, but only via a direct link to documents in the library e.g. a URL on a page or search.

SharePoint Language Pack Activation & Blob Cache Errors

Following the installation of SharePoint 2010 SP2 I noticed a large number of event log errors for the Publishing Cache on web front end servers.  The error was “An error occurred in the blob cache.  The exception message was “The system cannot fine the file specified. (Exception from HRESULT: 0x80070002)”.


Looking deeper into the error using the ULSViewer I could see that the error was being caused by language pack files that could not be found.  The files could not be found because following the installation of the language pack the Publishing Infrastructure feature had not been reactivated.  The TechNet notes here state “After you install a new language pack, you must deactivate and then reactivate any language-specific features before you use the new language pack.”

In order to resolve the error I went into Site Settings -> Site collection features.  I deactivated the SharePoint Server Publishing Infrastructure, then activated the feature.  You need to do this out of hours and it does affect your SharePoint site while the feature is deactivated.

SharePoint 2013 Federated Search To Bing

In this post I’ll describe the process of federating SharePoint 2013 search queries to Bing.

Open Central Administration and navigate to the Search Service Application.  If necessary, configure a proxy server and tick the box to use the proxy settings for federated sources.



Next, click on Result Sources under Queries and Results.


Enter a name for the result source and choose OpenSearch as the protocol.


In the source URL box enter:


Leave the Credentials Information as Anonymous, click Save.


Edit the search page you want to use the display the Bing results.  Choose Edit Web Part for the Search Results web part.


Click on Change query.


Change the query source to the Results Source you created earlier and click Ok.


Click OK to save the web part properties and save/check-in/publish your page.

Run a search to see the Bing results.


Enabling SharePoint Search With An Active Directory Forest Trust

Having configured SharePoint 2010 Search I had a problem whereby some users received zero results when searching SharePoint content.

In this configuration SharePoint was in one forest (A) and the users who got zero results were in another forest (B).  Users in the A forest were able to search and get results.  In order to resolve the issue I had to convert the SharePoint Search Service Application to store the SharePoint ACLs in Claims format.

To convert the SharePoint Search Service Application open the SharePoint Management Shell and run Get-SPServiceApplication.  Copy the ID of the Search Service Application.



Now run the code below replacing %SearchServiceID% with your Search Service Application ID.

$SearchApp = Get-SPServiceApplication %SearchServiceID%
$SearchApp.setproperty(“ForceClaimACLs”, 1)

Run a full crawl and users in the other forest will get search results.

Upgrading SharePoint 2010 To SharePoint 2013 Part 2

These are notes from my first upgrade of SharePoint 2010 to SharePoint 2013.  The purpose of the upgrade is to carry out an initial test upgrade to find any issues etc.  I’m not replicating the environment in terms of server roles etc. everything is installed on one server with local SQL.  I followed the steps outlined here: http://technet.microsoft.com/en-us/library/cc303436.aspx

This is part 2, part 1 can be found here, part 2 here, part 3 here, part 4 here and part 5 here.

Copy databases to the new farm for upgrade to SharePoint 2013

Reference: http://technet.microsoft.com/en-us/library/jj839720.aspx

As this is a test upgrade, don’t set the databases to read-only.

Backup all the SharePoint 2010 content databases and the databases for any service applications you’re going to upgrade.  See part 1 for upgradeable service applications.

Copy the SharePoint 2010 database backups to the SharePoint 2013 SQL server.

Restore the SharePoint 2010 database backups on the SharePoint 2013 SQL server.

If upgrading SQL server versions, change the database compatibility level to match the new SQL server version.

Customising A SharePoint Display Form To Remove A Field

Clicking View Properties on a SharePoint list item loads a display form which shows all the list columns and their values.  I needed to remove one of the list columns from a display form and in this post I’ll show you how I did it.  I’m going to remove the specific image column in the screenshot below.

In SharePoint Designer open the list you want to customise.  In the Forms section click New.


Provide a file name and select the form type you want to create.  Here I’m creating a display item form.  I’ve chosen to set the new form as the default display form as I want to override the default form.


In the Forms section right-click on the form and select Edit File in Advanced Mode.


Switch to code view and select the HTML for the row you want to remove. Each row is displayed withing <tr></tr> table row tags.  In the screenshot below I’ve selected the row which displays the jurisdiction column.  Once you’ve selected the correct row click delete.


Save your changes.  When you click on the list item and select view properties you’ll see that the row has been removed.


If your list contains attachments please be aware of the following bug whereby attachments aren’t displayed in the custom display form.  See the KB article for more information and a workaround.

“SharePoint Designer created display forms do not display attachments when present.”


Enable Refiner Counts In SharePoint 2013 Search

By default, search refiners in SharePoint 2013 don’t show a result count.  However, it’s easy to enable them with one change to the filter display template.  Below is how a refiner appears by default


The easiest way to work with display templates is to map a drive to \\%SHAREPOINTSERVER%@80\_catalogs\masterpage\.  Expand the folder tree and navigate to the Filters folder.  Backup a copy of Filter_Default.html before making changes.


Open Filter_Default.html in a text editor, I like to use Notepad++.  Navigate to the section as shown below and change the “ShowCounts:” value from false to true.  Save your changes.


Refresh the search page and refiner counts are now visible.




Incorrect Permissions For Central Administration Following Initial SharePoint 2013 Installation

Following the installation of a SharePoint 2013 environment I had an issue where Farm Administration security settings hadn’t been correctly applied.  Even though my SharePoint setup user account was listed in the Farm Administrators group and was a local administrator, many options were missing from the Central Administration site.  Some of the missing options included manage services on server and I was unable to create new service applications.

In order to correct the permissions, I re-ran the SharePoint 2013 Products Configuration Wizard.  When running the wizard I left all the options as they were.  Once the wizard had completed the permissions had been set correctly and Central Administration displayed all the options correctly.