Skip to content

Instantly share code, notes, and snippets.

View kausarayub's full-sized avatar
🎯
Focusing

kausarayub

🎯
Focusing
View GitHub Profile
@nlarkin
nlarkin / ForceUnlock.ps1
Created March 25, 2013 13:51
Powershell Script to force a undocheckout of a specified document using the bypasslocks method.
cls
$error.Clear()
##################################################################################################
# Load SharePoint Snapin
##################################################################################################
$snap = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if ($snap -eq $null) {
Write-Host "Loading Powershell Snapin..." -ForegroundColor Yellow
Add-PSSnapin Microsoft.SharePoint.Powershell