Skip to content

Instantly share code, notes, and snippets.

@nigamankit7
nigamankit7 / EmptyAllRecycleBin.ps1
Last active December 13, 2015 21:18
This powershell script for SharePoint 2010 iterate through each site collection in a given web application. First it moves content from each web recycle bin to site collection recycle bin and then delete it from the site collection "Admin Recycle Bin" URL Shortcuts for accessing Recycle bin: /_layouts/recyclebin.aspx - For Web Recycle Bin /_layo…
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$WebApp=get-spwebapplication "http://webapplicationname"
foreach ($SPSite in $webApp.Sites)
{
foreach($SPWeb in $SPSite.AllWebs)
{
@zzamboni
zzamboni / outlook_MakeTaskWithAttachmentFromMessage.bas
Last active March 17, 2018 23:46
Visual Basic code for creating tasks from email messages in Outlook. See full description at http://zzamboni.org/post/automatically-creating-tasks-from-email-in-outlook
' Make a task from a message, processing the subject to look for contexts like @home or @office, if
' any are found the new task is assigned to the matching category.
' For example if the subject contains "@of" and the @OFFICE category exists, it will be used.
' If the subject starts with "todo:" it will be removed before creating the task.
' Diego Zamboni, April 5th, 2011
' Set the string comparison method to Text ("AAA" = "aaa").
Option Compare Text