• PowerShell script to backup all SharePoint 2010 lists in all webs in all sites

    More backups the better. I wanted a file level backup of every list. Below I used PowerShell to iterate through all the lists on the server and dump them into a folder

    $backupDir="c:\Temp"
    foreach ($web in $(Get-SPSite | Get-SPWeb)){
    	foreach ($list in $web.Lists) {
    	mkdir -force "$backupDir\$($Web.Title.replace(' ',''))\"
    	Export-SPWeb $($web.Url) -itemurl "$($list.RootFolder.ServerRelativeUrl)" -path "$backupDir\$($Web.Title.replace(' ',''))\$($list.Title.replace(' ','')).cmp"
    	}
    }
    

  • Install-SPSolution, Add-SPSolution and Update-SPSolution return error: not supported with version 4.0.30319.269 of the Microsoft .Net Runtime.

    Just tried to install a soliution, and I received the error:

    Install-SPSolution : Microsoft SharePoint is not supported with version 4.0.30319.269 of the Microsoft .Net Runtime.

    I just installed the new PowerShell 3.0. To fix, launch a new powershell with -Version 2, and then run your command again:

    powershell -version 2

    That is what I get for installing the newest and the greatest!


  • How to find the pid of your SharePoint site in Windows server 2008 (for Visual Studio attaching to w3wp.exe)

    C:\Windows\system32\inetsrv\appcmd.exe list wp


  • My git notes

    Been playing around with git to manage my “Environment”. This is a note to self. May add more at some point
    List files that have been “staged”
    • git diff –name-only –cached
    To create a “Centro repo”
    • To setup an empty central repo:
      • mkdir /your/path/folder/project.git
      • cd /your/path/folder/project.git
      • git init –bare –shared
    • To add files to the central repo:
      • Go to the existing file structure and setup a new git repo (if it is not there already)
      • cd your/local/workspace/project
      • git init
      • git add .
      • git commit -m “First Commit”
      • git remote add origin server.domain.com:/your/path/folder/project.git
      • git push origin master
    • If you make a change  in your local copy and you want to push it up to the Centro repo
      • git add .
      • git commit -m “This is what changed”
      • git push origin master
    • And to get those changes to other machines
      • git pull origin master
    • And to setup a new machine
      • git clone server.domain.com:/your/path/folder/project.git

    Got most of the info from here


  • Coolest thing I have found in server 2012 – Management OData IIS Extensions

    Am I interpreting Management OData IIS Extensions correctly? This means I can write an iOS app to run my custom enterprise PowerShell scripts?

    Now I can justify iOS dev training! Cool.


  • Run PowerShell as system

    .\psexec -i -s Powershell.exe

    Found this from here:


  • Sharepoint 2010 URL for a Calendar’s Week and Month Views

    This may be a post for myself, and everyone may already know this, but I couldn’t find it quickly in a google search. I wanted to have a link to the “Week” view of a SharePoint 2010 calendar, but could not find the parmters to pass. Here they are:

    ?CalendarPeriod=week
    ?CalendarPeriod=month
    ?CalendarPeriod=day

    And to have a specific day:

    ?CalendarDate=8/24/2012


  • Windows Server 2012 can mount ISOs

    About time.