This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Delete-SqlDatabase($serverName, $databaseName) { | |
Import-Module SQLPS | |
$server = New-Object Microsoft.SqlServer.Management.Smo.Server($serverName) | |
$db = $server.databases[$databaseName] | |
if ($db) { | |
$server.KillAllprocesses($databaseName) | |
$db.Drop() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Set-PropertyBag { | |
param ( | |
[string]$PropertyName, | |
[string]$PropertyValue = $null, | |
[bool]$Indexable = $false, | |
[Microsoft.SharePoint.Client.Web]$Web, | |
[Microsoft.SharePoint.Client.ClientContext]$ClientContext | |
) | |
process { | |
$indexedPropertyBagKey = "vti_indexedpropertykeys" |