Tag: SharePoint 2010

Today I was honored to give two presentations at SPS Events Cincinnati aka #SPSpookinatti 2014!

My first presentation was specific to leveraging Windows PowerShell against SharePoint Online for the purposes of automating site and content build and configuration. I’ve given this one a few times, and it’s always fun to share the CSOM love. Today I was fortunate that all of the demos worked, which wasn ice.

My second presentation was about moving off of a file share and onto an ECM solution built on SharePoint Server 2013. While there are lots of approaches to the migration and implementation aspects of such a topic, I provided a scenario based on a nested file share structure – and how defining the Information Architecture and metadata was already done by the structure of the file share itself.Continue reading…

Share:

Like this:

Today I had the privilege of presenting on Managing SharePoint Anywhere with Windows PowerShell at Dog Food Conference, 2014!

My presentation was focused on leveraging the Microsoft.SharePoint.Client assembly to write Client Side Object Model (CSOM) code against SharePoint Online. However, the twist is that it’s all done in PowerShell 3.0 – and there is a set of PowerShell functions written specifically to handle automation in SharePoint Online.

While I have shared this topic a time or two at other events, this was the most refined version of the presentation.

Share:

Like this:

My presentation was about moving off of a file share and onto an ECM solution built on SharePoint Server 2013. While there are lots of approaches to the migration and implementation aspects of such a topic, I provided a scenario based on a nested file share structure – and how defining the Information Architecture and metadata was already done by the structure of the file share itself.Continue reading…

Share:

Like this:

As a SharePoint Consultant, a lot of the work I do is around upgrades and migrations. I’ve done quite a few of these, and I’ve done them from 2003 to 2007, 2007 to 2010, and now 2010 to 2013. I’ve done several migrations where a 3rd party tool was used to migrate the content, but a lot of the time I end up using the standard database attach approach to move the content databases from the old farm to the new farm. In doing so, obviously PowerShell is required – but more times than not there are multiple content databases. Manually testing and mounting each one can be extremely time consuming, especially if you’re going to end up deploying the content to multiple farms (Dev, QA, DR, Production). What I’ve decided to do is actually build some PowerShell and XML that can be used both to run Test-SPContentDatabase as well as Mount-SPContentDatabase to allow you to do these in bulk.

When writing this script, I had a few things in mind that I wanted to accomplish:

Provide 100% of the input to the script in the form of XML, allowing the script to be 100% separate from the parameters and input.

Provide options to use Test OR Mount, depending on where I’m at in the migration. (It’s always recommended to run Test-SPContentDatabase BEFORE Mount-SPContentDatabase!)

Provide readable output and progress indication to know where the script is in it’s execution.

To accomplish these 3 goals, I made sure to:

Include ALL of the available options when running Test-SPContentDatabase AND Mount-SPContentDatabase in the XML and Script (empty values are simply ignored).

Include SWITCH parameters for Test and Mount – to allow the user to specify their intention at runtime.

Include Write-Progress and Write-Output to provide clear output to the executing user.

Now that I’ve explained my intentions with writing this code, I’ll share it!

<#
.Synopsis
This script leverages an XML file as the input - and based on the XML contents will attach one or more
content databases to one or more SharePoint 2010/2013 Web Applications.
.Description
This PowerShell Script uses Get-Content, ForEach-Object and Mount-SPContentDatabase cmdlets along with
some other various code snippets to iterate through one or more web applications.
While attaching content databases to a SharePoint 2010/2013 farm, it will use Write-Progress to provide an update in the PowerShell window.
.Example
Mount-SPContentDatabasesFromXml.ps1 -XmlInput C:\ContentDatabases.xml
This example will mount all content databases to all web applications specified in an XML file at C:\ContentDatabases.xml.
Example XML syntax:
<?xml version="1.0" encoding="utf-8" ?>
<WebApps>
<WebApp Url="http://igs">
<Databases>
<Database Name="SP2010_Content_1" WarningLevel="5" MaxSites="10"/>
<Database Name="SP2010_Content_2" WarningLevel="50" MaxSites="100"/>
</Databases>
</WebApp>
</WebApps>
.Notes
Name: Mount-SPContentDatabasesFromXml.ps1
Author: Ryan Dennis
Last Edit: 9/16/2013
Keywords: Mount-SPContentDatabase, ForEach-Object, Get-Content, SharePoint Upgrade/Migration
.Link
http://www.sharepointryan.com
ryan@sharepointryan.com

Share:

Like this:

This post is one that came out of a conversation with another SharePoint buddy of mine. We were discussing how to evenly place SharePoint Site Collections into multiple content databases, and how it’s sort of a nice, relatively unknown ‘feature’ of SharePoint that it will use a round-robin approach of placing them into all available content databases for a web application. While it’s very common to place individual SharePoint Site Collections into their own content database, and that’s certainly a good approach – it is certainly a good option to pre-create several content databases and allow SharePoint to handle the balancing act, as it were…

Having said that, here is what I did to prove it out for the purposes of this blog post. I already had an empty web application at http://testtest.adventureworks.com with no content databases from some other testing I’ve done recently:

1. Store the Web Application in a variable

$wa = Get-SPWebApplication http://testtest.adventureworks.com

2. Create 10 Content Databases – note the 1..10 that I’m piping to the ForEach-Object cmdlet. This is a great shorthand way to quickly create a number of ‘things’ in PowerShell.