TwitterLinkedInBlog

Thursday, May 29, 2014

PowerShell - Custom List - Delete All Versions

$web = Get-SPWeb "http://localhost"
$list = $web.Lists["MyList"]
foreach ($item in $list.Items)
{
  $item.Versions.DeleteAll()
}
$list.EnableVersioning=$False
$list.update()
$web.Dispose();

Update: This seems to have issues, so need to follow up with better solution.

Friday, May 23, 2014

Get Content Database Name with PowerShell

Get-SPDatabase | Where-Object { $_.TypeName -eq "Configuration Database" } | Select Name

Sunday, May 18, 2014

Windows Explorer - Favorites

Windows Explorer > Right-Click 'Favorites' > Add current location to Favorites.

C:\Windows\System32\drivers\etc

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14

C:\inetpub\wwwroot\wss\VirtualDirectories

C:\ProgramData\Microsoft\SharePoint\Config

Wednesday, May 14, 2014

Filter on Workflow Status

NotStarted = 0
FailedOnStart = 1
InProgress = 2
ErrorOccurred = 3
StoppedByUser = 4
Completed = 5
FailedOnStartRetrying = 6
ErrorOccurredRetrying = 7
ViewQueryOverflow = 8
Max = 15
OOTB Approval WF:
Canceled = 15
Approved = 0×10 (16)
Rejected = 0×11 (17)

References:
http://chanakyajayabalan.wordpress.com/2010/03/08/sharepoint-workflow-status-codes/

Friday, May 9, 2014

Word 2010 - Show Document Panel

Word 2010 > 'File' tab > 'Info' > 'Properties' dropdown > 'Show Document Panel'

Thursday, April 10, 2014

Extract Address from an Excel Hyperlink

Function HLink(rng As Range) As String
'extract URL from hyperlink
'posted by Rick Rothstein
  If rng(1).Hyperlinks.Count Then HLink = rng.Hyperlinks(1).Address
End Function


Reference:
http://blog.contextures.com/archives/2010/12/13/get-the-url-from-an-excel-hyperlink/

Wednesday, April 9, 2014

AppOffline.htm

Site Under Construction
App Offline

AppOffline.htm
Place this file in the root of the application.

Reference:
http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx