Tuesday, 14 June 2016

CRUD Operations in SharePoint using PowerShell

The following is a series of commands in SharePoint using PowerShell helping to perform many administrative tasks or even development tasks with ease.

Get-HElp Add-SPAppDeniedEndpoint -examples
#Stop Apps from accessing an endpoint
Add-SPAppDeniedEndpoint -Endpoint "_vti_bin/contoso/service.asmx"
Get-SPAppDeniedEndpointList
Get-Help Add-SPClaimTypeMapping -Examples
#Add a claim-https://technet.microsoft.com/en-us/library/ff607650.aspx
#Note: the New-SPClaimTYpeMapping worked and Add-SPClaimTYpeMapping is an example from msdn site.
Get-TrustedIdentityTokenIssuer -Identity "LiveIDSTS" | Add-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" -IncomingClaimTypeDisplayName "PUID" -LocalClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/thumbprint"
$map1 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming
Get-Help Add-SPDiagnosticsPerformanceCounter -examples
<#This example adds the _Total instance of the counter % Processor Time in the
    category Processor on database servers.#>
Add-SPDiagnosticsPerformanceCounter -category Processor -counter "%Processor Time" -instance "_Total" -databaseserver
Get-SPDiagnosticsPerformanceCounter
Get-Help Add-SPDistributedCacheServiceInstance -examples -Online
#Add Distributed Cache
Add-SPDistributedCacheServiceInstance

No comments:

Post a Comment