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
Get-ChildItem "C:\Users\*\AppData\Roaming\Microsoft\Teams\*" -directory | Where name -in ('application cache','blob storage','databases','GPUcache','IndexedDB','Local Storage','tmp') | ForEach{Remove-Item $_.FullName -Recurse -Force -WhatIf} |
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
var client_id = pm.collectionVariables.get("adminClientId"); | |
var client_secret = pm.collectionVariables.get("adminClientSecret"); | |
var tenant = pm.collectionVariables.get("netforcetenantid") | |
var resource = pm.collectionVariables.get("adminRessounce") | |
pm.sendRequest({ | |
url: 'https://login.microsoftonline.com/' + tenant + '/oauth2/token', | |
method: 'POST', | |
header: { | |
'Content-Type': 'multipart/form-data', |
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
CREATE TABLE employees ( | |
employee_id NUMERIC NOT NULL, | |
first_name VARCHAR(1000) NOT NULL, | |
last_name VARCHAR(900) NOT NULL, | |
date_of_birth DATE , | |
phone_number VARCHAR(1000) NOT NULL, | |
junk CHAR(1000) , | |
TS timestamp, | |
id_num int IDENTITY(1,1), | |
CONSTRAINT employees_pk |
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
$webapp = Get-SPWebApplication "https://WEBAPP" | |
foreach($site in $webapp.Sites){ | |
foreach($web in $site.AllWebs){ | |
if ($web.HasUniqueRoleDefinitions){ | |
if($web.RequestAccessEnabled){ | |
Write-Host $Web.URL | |
Write-Host $Web.RequestAccessEmail | |
Write-Host "---" | |
if ($web.RequestAccessEmail -eq '[email protected]'){ | |
Write-Host $Web.URL "Update RequestAccessEmail" |
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
$farm = Get-SpFarm | |
$file = $farm.Solutions.Item(“documenteventreceiver.wsp ”).SolutionFile | |
$file.SaveAs(“E:\WSPFiles\documenteventreceiver.wsp ”) |
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 changeRedirect(options) { | |
for (var i = 0, buttons = document.querySelectorAll(options.selector); i < buttons.length; i++) { | |
var newOnClick = function(originalOnClick) { | |
return function(){ | |
Nav.navigate = STSNavigate = function() { | |
window.location = options.redirectTo | |
} | |
originalOnClick() | |
} | |
} |
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
USE [master]; | |
GO | |
DECLARE @database NVARCHAR(200) , | |
@cmd NVARCHAR(1000) , | |
@detach_cmd NVARCHAR(4000) , | |
@attach_cmd NVARCHAR(4000) , | |
@file NVARCHAR(1000) , | |
@i INT , | |
@DetachOrAttach BIT; |
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
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | |
#Function to set Resource throttling values in SharePoint 2013 | |
Function Set-ResourceThrottling | |
{ | |
param ( | |
[parameter(Mandatory=$true)] [string]$WebAppURL, | |
[parameter(Mandatory=$true)] [string]$ListViewThreshold, |
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
<configuration> | |
<system.webServer> | |
<staticContent> | |
<mimeMap fileExtension=".ipa" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".zip" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".json" mimeType="application/json" /> | |
</staticContent> | |
<directoryBrowse enabled="true" showFlags="Date,Time,Extension,Size" /> | |
</system.webServer> | |
</configuration> |
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
var webUrl = "newSubSite", | |
webTitle = "New Sub Site", | |
webDesc = "Description about the new web/site"; | |
var siteTemplate; | |
var CONST_PROJECT_TEMPLATE = "Custom Project Template"; | |
var ctx = SP.ClientContext.get_current(); | |
var webTemplates = ctx.get_web().getAvailableWebTemplates(1033, false); | |
ctx.load(webTemplates); |
NewerOlder