[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges({param([string]$url = "http://sharepointsite/", `[string]$oldprovider = `"keystoneuser", `[string]$newprovider = `"i:0ǵ.t|keystone sts|radiant\")add-pssnapin microsoft.sharepoint.powershell -EA 0# Get all of the users in a site#$users = get-spuser -web $url...
Showing posts with label Powershell Script. Show all posts
Showing posts with label Powershell Script. Show all posts
Thursday, March 16, 2017
Monday, February 27, 2017
There are times when you want to check which event receivers are attached to a SharePoint list. This can be easily achieved through use of a PowerShell script.
$spWeb = Get-SPWeb Identity http://sharepoint$spList = $spWeb.Lists["My List"] $spList.EventReceivers | Select Name,...
27
Feb
“This post details the steps for backing up the content database of a SharePoint site through PowerShell. view the steps for backing up a content database through Central Administration.”
PowerShell provides a means to backup data within SharePoint through the following command:
Backup-SPFarm -Directory...
Friday, December 2, 2016
02
Dec
Add-PSSnapin Microsoft.SharePoint.PowerShell
# Replace siteurl with actual web url
$web = Get-SPWeb -Identity "siteurl"
# Replace docurl with document library url
$list = $web.GetList("docurl")
function DeleteFiles {
param($folderUrl)
$folder = $web.GetFolder($folderUrl)
foreach...
Monday, October 24, 2016
Fast Site Collection Creation for a template,
Enable-SPWebTemplateForSiteMaster -Template “STS#0” -CompatibilityLevel 15
Let’s get the DB where we have already provisioned a site collection.
$DB = Get-SPContentDatabase -site http://peakfinders/sites/fast
Now lets create a SiteMaster in it.
New-SPSiteMaster...