Create an empty git repo or reinitialize an existing one
$ git init
workflow PingUrlParallel { | |
param( | |
[string]$url, | |
[int]$parallelCount = 10, | |
[int]$iterations = 10 | |
) | |
foreach -parallel ($x in 1..$parallelCount) { | |
1..$iterations | %{ |
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"} | |
# update SharePoint cache token lifetime | |
$SPContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService | |
$SPContentService.TokenTimeout = (New-TimeSpan -minutes 5) | |
$SPContentService.Update() | |
# udpate SharePoint claims token lifetime |
cls | |
$error.Clear() | |
################################################################################################## | |
# Load SharePoint Snapin | |
################################################################################################## | |
$snap = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'} | |
if ($snap -eq $null) { | |
Write-Host "Loading Powershell Snapin..." -ForegroundColor Yellow | |
Add-PSSnapin Microsoft.SharePoint.Powershell |
Create an empty git repo or reinitialize an existing one
$ git init
# https://github.com/dansmith | |
# | |
$source = "My Application Name" | |
$wid=[System.Security.Principal.WindowsIdentity]::GetCurrent() | |
$prp=new-object System.Security.Principal.WindowsPrincipal($wid) | |
$adm=[System.Security.Principal.WindowsBuiltInRole]::Administrator | |
$IsAdmin=$prp.IsInRole($adm) |
<# | |
.SYNOPSIS | |
Fetches an access token using the IdentityServer3 token endpoint | |
.DESCRIPTION | |
Modify the parameters so it matches your IdentityServer3 instance. | |
.NOTES | |
File Name : GetToken.ps1 | |
Author : John Korsnes (@johnkors, johnkors) | |
Prerequisite : PowerShell V3 | |
.LINK |
(function() { | |
var nsName = "LS"; // root namespace name | |
var ns = window[nsName]; // root namespace alias | |
var utils = ns.Utils; // utils alias | |
ns.SP = ns.SP || {}; | |
ns.SP.JSOM = { | |
Data: { | |
Sites: {} // cache for Taxonomy terms JSON | |
}, |