Skip to content

Instantly share code, notes, and snippets.

@eirikb eirikb/sp.ps1 Secret
Created Jun 12, 2014

Embed
What would you like to do?
Add-PSSnapin Microsoft.SharePoint.PowerShell
clear
Write-Host "Starting..."
Start-SPAssignment -Global | Out-Null
try{Start-Transcript -Path "C:\Log\log-$((Get-Date).ToString('yyyy-MM-dd')).txt" -Append}catch {}
// HERE BE CODE
try{Stop-Transcript}catch{}
Stop-SPAssignment -Global | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.