Skip to main content

Posts

Showing posts from July, 2017

Disable Mysite Provisioning in SharePoint using Powershell

Disable Mysite Provisioning in SharePoint using Powershell Add-PSSnapIn Microsoft.SharePoint.PowerShell -EA 0  function DisableMySiteCreation([string]$UserProfileProxyName)  {  $upaproxy = Get-SPServiceApplicationProxy | Where-Object {$_.DisplayName -eq $UserProfileProxyName} $upasecurity = Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $upaproxy $authuser = New-SPClaimsPrincipal -Identity 'c:0(.s|true' -IdentityType EncodedClaim $ntauthusers = New-SPClaimsPrincipal -Identity 'c:0!.s|windows' -IdentityType EncodedClaim $localAuthUsers = New-SPClaimsPrincipal "NT AUTHORITY\Authenticated Users" - IdentityType WindowsSamAccountName Revoke-SPObjectSecurity -Identity $upasecurity -Principal $authuser -Rights "Create Personal Site" Revoke-SPObjectSecurity -Identity $upasecurity -Principal $authuser -Rights "Use Personal Features" Revoke-SPObjectSecurity -Identity $upasecurity -Principal $authuser -Rights ...

Create SharePoint Site Quote Template Using Powershell

Create SharePoint Site Quote Template Using Powershell  Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue function CreateQuotaTemplate ($QuotaName, $MaxLevelMB, $WarnLevelMB)  {  $quotaTemplate = New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate  $quotaTemplate.Name = $QuotaName  $quotaTemplate.StorageMaximumLevel = ($MaxLevelMB*1024)*1024  $quotaTemplate.StorageWarningLevel = ($WarnLevelMB*1024)*1024  $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService  $contentService.QuotaTemplates.Add($quotaTemplate)  $contentService.Update()  Write-Host "New Quota Template: $($QuotaName) has been added!"  }  CreateQuotaTemplate –QuotaName "10GB_Quota" –MaxLevelMB 10000 –WarnLevelMB 9500  CreateQuotaTemplate –QuotaName "25GB_Quota" –MaxLevelMB 25000 –WarnLevelMB 20000  CreateQuotaTemplate –QuotaName "50GB_Quota" –MaxLevelMB 500...

Get SharePoint List Items Using REST

1. Create List and items similar to below. In my case list name is Site Links. 2. Download latest jquery.js bootstrap.js and bootstrap.css <div class="col-xs-12 siteLinksDiv siteLinksDivAlone" style="height: 254px;">               <div class="row">                 <div class="col-xs-12">                   <h4>Site Links <span style="width:40%;display: block;margin-top: 10px;" class="customBordered_h3 displayBlock"></span></h4>                   <ul id="sitelinks" class="paddingLeftZero">                                     </ul>                 </div>               </div...