Showing posts from January, 2013

Connect PowerShell to remote SharePoint 2010 Server

Why RDP or login to a SharePoint server when all you really need to do is run some good old PowerShell commands?  Plus I Highly recommend using the PowerShell IDE.  This way you can script in a nice editor and run the commands below it.  The interface is awesome.

Go through this guide to setup the Server and then your client to allow the remote PowerShell and the credential type:

Note:  In PowerShell IDE there is an icon and File command for New Remote PowerShell Tab.  This is nice, but I like to save a lot of things and I am nearly 100% SharePoint  so I like to run the script for the Add-PsSnapin SharePoint so that I can talk to SharePoint.

Here is the setup guide so you can script your own connections:

When I want to connection to SharePoint I just run the script and all I have to enter is the password, and I could write that to an encrypted text file for future use, but…

Enumerate All SharePoint 2010 Sites and Templates

Run this is PowerShell (With SharePoint snap-in):
Get-SPWebApplication "http://webapplicationurl/" | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, Url, WebTemplate, Configuration, ID | Export-CSV c:\IterateAllSitesSubsites.csv -NoTypeInformation
This will output a comma separated value file you can open with Excel and get all of your sites with their templates.

SharePoint 2010 Slide Library Errors

I had several users today who have been unable to properly use the SharePoint 2010 Slide Library features. I went to this location and tested it myself and truly things were broken all over.  If I clicked on a link the Office Web Apps we have installed failed to open throwing an error telling me I need Office 2007 installed.  If I use the drop-down menu to Edit in Microsoft PowerPoint, another error about a Microsoft application not installed.

I found the fix.  It was easy.  I didn't have to open ULS Log Viewer, re-install Office Web Apps, or try to force the library to open the file in the client application by default.

Instead it was IE 64-bit browser.  I sent this to users:

You need to only use the 32-bit version of Internet Explorer.To confirm what you are running, click the settings(Gear icon in upper left of browser or Tools-Internet Options) , click About Internet Explorer.  If it says “64-bit Edition” after the version number, this is your problem.If you are opening Interne…

Service Applications PowerShell

What lies below is my PowerShell script that will create all of the Service Applications typically used in most farms, all with custom database names and some with separate Application pools.  You will need to adjust the names, settings, etc. to suit your environment, but this is a nice shell to get you going.

What is missing?
The User Profile Service Application.  This cannot be setup via PowerShell.  Don't even try it.  Instead setup this Service Application afterwards using the Central Admin GUI.  You will be able to select custom database names here so that all of your databases can have a nice prefix like mine: SP2010_Dev_ and then nice names after that for each function.  Use this guide to setup the User Profile Service:

Script (save the below area in notepad or PowerShell ISE (recommended) and save as .ps1 file extension)  Run this script in SharePoint Management Shell:

This script replicates most of the functionality foun…