View Highlight-Syntax.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original Author: Lee Holmes, http://www.leeholmes.com/blog/MorePowerShellSyntaxHighlighting.aspx | |
# Modified by: Helge Klein, http://blogs.sepago.de/helge/ | |
# (http://blogs.sepago.de/e/helge/2010/01/18/syntax-highlighting-powershell-code-in-html-with-a-powershell-script) | |
# Modified again by: David Wise, http://blog.davidjwise.com | |
# Syntax highlights a PowerShell script. | |
# | |
# Usage: Supply the script to syntax hightligh as first and only parameter | |
# | |
# Output: Copy of original script with extension ".html" |
View SPCmdAsUser.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set PSshell="C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -NoExit & 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1'\"" | |
runas /user:myDomain\ServiceAccountName /savecred %PSshell% | |
if errorlevel 1 pause | |
:end |
View MultiMasterHttpModule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web; | |
using System.Web.UI; | |
using System.IO; | |
public class MasterPageModule : IHttpModule | |
{ | |
public void Init(HttpApplication context) | |
{ | |
context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute); |
View IncrementAssemblyFileVersion.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($PathToProjectRoot) | |
#used to make it easier to spot the comments from the script in the Build Output window | |
$msgPrefix=" | " | |
#useful when testing the script - simply point this to the root of a folder that contains a project | |
#and the script can be run via PowerShell or ISE without having to constantly build via VS | |
$defaultProjectRoot="C:\projects\dwise\Samples\PowerShell\Project.Folder" | |
#the default location for the TFS files. You may need to update this for your specific installation |