SharePoint Helper Commands

SharePoint Helper Commands


I have collected some commands that i use frequently while using with SharePoint and will try to append going forward

Distributed Cache commands

Use-CacheCluster: to prepare administering distributed cache.

Get-CacheHost: to determine the status of the cache service.

Restart-CacheCluster:  Restarts the distributed cache service on all servers in the cluster. It will also clear the contents of the cache.

 

 

Disable LoopBackCheck

 

New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -Value "1" -PropertyType dword

 

Troubleshoot with ULS logs

  • Enable SharePoint traces by executing next SP cmdlet : set-sploglevel -traceseverity verboseex
  • Execute next powershell cmdlet: $st = get-date
  • Do your testing
  • Stop SP traces by executing: clear-sploglevel
  • Execute next command to get all the SP traces in a Text file: merge-splogfile -starttime $st -path c:\sharepointlogs.log

 

Get ULS Logs for specific correlation

 

Merge-SPlogfile –Path c:\log.log –Correlation ba05e237-0680-403a-b9f6-e49f96ac55d4

 

 

Check Workflow Status

Import-Module WorkflowManager

Get-WFFarm

Get-WFFarmStatus

 

 

Developer DashBoard

$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService

$dds = $svc.DeveloperDashboardSettings

$dds.DisplayLevel = "On"  --or you can modify it to Off

$dds.Update()

Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (1 items)