Pages

Wednesday 21 January 2015

Useful PowerShell Commands for SharePoint 2010

  • To get the current verion of SharePoint Installed:
     get-spfarm | select BuildVersion
 
  • Export a list from SharePoint 2010
    
    Export-SPWeb "http://sitecollection/subsite/subsubsite/subsubsubsite/" -itemurl "/subsite/subsubsite/subsubsubsite/Lists/myList" -path "e:\backups\myList.cmp"
    
    

Getting Started with Team Foundation Service TFS) with Visual Sudio 2010 Developer Edition



Easy to follow articles here:

http://blogs.msdn.com/b/visualstudioalm/archive/2011/12/07/connect-visual-studio-2010-to-your-tfs-preview-account.aspx

https://tfs.visualstudio.com/en-us/learn/code/connect-vs/


Using PowerShell to set a custom SharePoint 404 Error Page

Using PowerShell to set a custom SharePoint Error Page

You can define a custom error page for SharePoint (see Jingmei Li's Blog) for instructions.
Here are the PowerShell caommands I used instead of having to compile a console app (step 5 in Jingmei's blog).
PS C:\> [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
PS C:\> $webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("http://www.wssdemo.com")
PS C:\> $webapp.FileNotFoundPage = "wssdemo404.html"
PS C:\> $webapp.Update()
Now try a page that doesn't exists like http://www.wssdemo.com/pages/deletedpage.aspx