Skip to content

Instantly share code, notes, and snippets.

View pkskelly's full-sized avatar

Pete Skelly pkskelly

View GitHub Profile
@pkskelly
pkskelly / TW-CreateBlankClientExtranetSite.ps1
Created December 3, 2014 20:06
Add a blank site collection to an Office 365 tenant in SharePoint Online
# =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
# Script: TW-CreateBlankClientExtranetSite.ps1
#
# Author: Pete Skelly
# Twitter: ThreeWillLabs
# http://www.threewill.com
#
# Description: Add a blank site collection to an Office 365 tenant in SharePoint Online
#
# WARNING: Script provided AS IS with no warranty. Your mileage will vary. Use
@pkskelly
pkskelly / Install-DevTools.ps1
Last active August 29, 2015 14:06
Chocolatey Developer Environment Build Script
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
##Developer Tools
#cinst sysinternals
#cinst 7zip
cinst diffmerge
#cinst winmerge
#cinst fiddler
#cinst paint.net
#cinst githubforwindows
@pkskelly
pkskelly / Delete-SPDocsInBatch.ps1
Last active August 29, 2015 14:01
Snippet from an old script which deletes documents from a SharePoint Document library using SPWeb.ProcessBatchData(). Script used a CSV file of $activities which defined what should be deleted.
if ($clean)
{
$deletedSharedDocs = $false;
Write-Host "`n`nCleaning all lists of all content...Please wait"
foreach($activity in $activities)
{
$web = get-web $activity.RootUrl
$list = $web.Lists[$activity.ListName];
\ if ($list.BaseType -eq "DocumentLibrary" -and ($list.ItemCount -gt 0))
@pkskelly
pkskelly / Add-SPListItemsFromCSV.ps1
Last active October 12, 2015 15:07
Add list items to SharePoint Online - Office 365 List using CSOM from CSV file.
# =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
# Script: Add-SPListItemsFromCSV.ps1
#
# Author: Pete Skelly
# Twitter: ThreeWillLabs
# http://www.threewill.com
#
# Description: Add list items to SharePoint Online - Office 365 List using CSOM from CSV file.
#
# WARNING: Script provided AS IS with no warranty. Your mileage will vary. Use
@pkskelly
pkskelly / Clear-SPListItems.ps1
Last active May 19, 2017 14:17
Clear-SPListItems.ps1 simulates SPWeb.ProcessBatchData() using CSOM to batch ListItemCollection item deletes. Feedback welcome! To see what is going on under the covers, run Fiddler and watch the traffic for the requests.
# =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
# Script: Clear-SPListItems.ps1
#
# Author: Pete Skelly
# Twitter: ThreeWillLabs
# http://www.threewill.com
#
# Description: Purge list in Sharepoint Online - Office 365 using CSOM by
# batching CSOM calls to simulate SPWeb.ProcessBatchData().
#