Skip Ribbon Commands
Skip to main content
Use SHIFT+ENTER to open the menu (new window).
  
  
  
Code
  
  
JavaScript
function FunctionName() {
    // Do something
}
 
_spBodyOnLoadFunctionNames.push("FunctionName");
  
PowerShell
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
  
XSL
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
  
PowerShell
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$siteUrl = "http://servername/site"
$pageUrl = "default.aspx"
$site = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$web =$site.OpenWeb()
$scope = [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared
$mgr = $web.GetLimitedWebPartManager($pageUrl, $scope)
$mgr.WebParts | Format-Table Title, WebBrowsableObject
  
C#
SPSecurity.RunWithElevatedPrivileges(delegate()
{
    // do something
});
  
STSADM
stsadm -o setproperty -pn max-template-document-size -pv 40000000
  
XSL
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>
Andy Burns
  
PowerShell
[Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet
http://hackerthedude.blogspot.com/2010/03/check-network-connectivity-with-power.html