Skip to content

Instantly share code, notes, and snippets.

@mthierba
mthierba / CreateTrustedSecurityTokenIssuer.ps1
Last active August 29, 2015 14:27 — forked from andrewconnell/CreateTrustedSecurityTokenIssuer.ps1
SharePoint Hosted Apps S2S - Create Trusted Security Token Issuer
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$issuerID = "11111111-1111-1111-1111-111111111111"
$targetSiteUrl = "http://wingtipserver"
$targetSite = Get-SPSite $targetSiteUrl
$realm = Get-SPAuthenticationRealm -ServiceContext $targetSite
$registeredIssuerName = $issuerID + '@' + $realm
@mthierba
mthierba / CreateTestCertificateForS2STrust.ps1
Last active August 29, 2015 14:27 — forked from andrewconnell/CreateTestCertificateForS2STrust.ps1
SharePoint Hosted Apps S2S - Create Self-Signed Certificate for SharePoint App Server
$makecert = "C:\Program Files\Microsoft Office Servers\15.0\Tools\makecert.exe"
$certmgr = "C:\Program Files\Microsoft Office Servers\15.0\Tools\certmgr.exe"
# specify domain name for SSL certificate
$domain = "appserver.wingtip.com"
# create output directory to create SSL certificate file
$outputDirectory = "c:\Certs\"
New-Item $outputDirectory -ItemType Directory -Force -Confirm:$false | Out-Null