Tag Archives: SharePoint
FIXED – Create User Profile Service – Sync database not editable
Quick demo for how to customize the Central Admin GUI default Sync database name (prefilled with GUID) to custom value more readable and admin friendly.
Simply press F12, select the text field, and remove “disabled=disabled” from the <INPUT> HTML element. Now able to enter any value and click “Create” UPS.
Video
Screenshot
Reboot SharePoint Farm
Quick code snippet to share with you guys for rebooting the full SharePoint farm. Invoke remote restart command to all peer machines with any valid SharePoint role, then reboot local machine last. NOTE – SQL not included but can be with adjusting the filter. Cheers. ![]()
Code
Add-PSSnapIn "Microsoft.SharePoint.PowerShell"
$local = $env:COMPUTERNAME
$localFQDN = $env:COMPUTERNAME + "." + $env:USERDNSDOMAIN
$targets = Get-SPServer |? {$_.Role -ne "Invalid"} |? {$_.Address -ne $local -and $_.Address -ne $localFQDN} | Select Address
$targets |% {Write-Host "Rebooting $($_)"; Restart-Computer $_ -Force}
Restart-Computer -ForceDownload
SharePoint Calendar Color Overlay (HEX DISPLAY)
Quick reference below for the 7 Microsoft calendar overlay colors available in SharePoint Online as of 1/19/2020. User Voice community has requested ability to add custom colors, but not yet implemented. Upvote if you like at https://sharepoint.uservoice.com/forums/601165-suggestion-archive/suggestions/11317953-select-own-hex-colors-for-calendar-overlay. Notes on how to create Calendar overlay at https://blog.virtosoftware.com/how-to-color-code-sharepoint-calendars/.
| Microsoft Color | |
| Dark Teal, #00485b | |
| Blue, #0078d4 | |
| Dark Green, #288054 | |
| Olive Green, #767956 | |
| Red, #ed0033 | |
| Dark Purple, #682a7a | |
| Dark Teal, #006984 | |
| Dark Green, #134029 | |
| Brown, #3b3c2a |
How to script SharePoint Prerequisite IIS Role
When creating a new SharePoint 2013/2016/2019 server, the IIS web role needs to be installed with certain features enabled. Below is PowerShell one liner to accomplish that. Cheers. ![]()
Code
Add-WindowsFeature NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-Pipe-Activation45,NET-WCF-HTTP-Activation45,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Asp-Net45,Web-Net-Ext,Web-Net-Ext45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Xps-Viewer -verbose
Screenshots
VIDEO – MS Graph Quick Start (Angular CLI)
Demo of the Microsoft Graph “Quick Start” which generates a full code project with a new App ID (Client ID). Azure Active Directory (AAD) manages a registration of application ID paired with API permission grants for which API calls can be made. From there, the client side JavaScript application can invoke HTTP GET to fetch JSON data for the allowed MS Graph API endpoints. Cheers! ![]()
Video
Screenshots
References
FIXED – Distributed Cache is Unhappy
When SharePoint Server Distributed Cache is unhappy in a farm, you may see page loads error, 404s not found, API failures, and similar. Having a well configured Distributed Cache will ensure healthy page renderings. PowerShell notes below. Credit to one awesome long term SP engineer for the snippets below. Thank you. Cheers! ![]()

CHECK STATUS
To check the status of the Distributed Cache Servers, run this command on each Farm from a DC machine.
# CHECK DC STATUS
Use-CacheCluster;
Get-CacheHost;
$servers=Get-CacheHost;
foreach ($server in $servers) {
Get-AFCacheHostConfiguration -ComputerName $server.hostname -CachePort "22233"
}REMOVE SERVER
# REMOVE COMPUTER TO DC HOSTS Remove-SPDistributedCacheServiceInstance
ADD SERVER
# ADD COMPUTER TO DC HOSTS Add-SPDistributedCacheServiceInstance
CHANGE SERVICE = UP
To change the Service Status of a server to UP, run these commands on the server you wish to bring UP.
# CHANGE DC STATUS = UP
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()CHANGE STATUS = DOWN
To change the Service Status of a server to DOWN, run these commands on the server you wish to bring DOWN.
# CHANGE DC STATUS = DOWN
$instanceName = "SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()CHANGE IsLeadHost=FALSE
There can be only one IsLeadHost=True server in a Farm. If there is more than is IsLeadHost=True servers your Farm will act unstable and people will see page load errors. We traditional set the lowest server name alphabetically in a Farm as IsLeadHost. Change the DC Farm so that Service Status=DOWN on server.
# CHANGE LEAD HOST = FALSE
Use-CacheCluster;
$instanceName = "SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
#Change IsLeadHost value to false (use computer name or local computer name)
Set-CacheHostConfig -HostName $env:computername -CachePort 22233 -IsLeadHost "false" -RefreshNow
# CHANGE DC SERVER STATUS = UP
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()
# WAIT 30 SECONDS FOR DC STATUS=UP
Start-Sleep -s 30
# CHECK DC STATUS
Use-CacheCluster; Get-CacheHost; $servers=Get-CacheHost;
foreach ($server in $servers) {
Get-AFCacheHostConfiguration -ComputerName $server.hostname -CachePort "22233"
}More than one IsLeadHost=True is BAD.
SET DC CACHE SIZE (24GB server = 6GB CACHE)
Also notice our default DC cache size is only 819 MB. MSFT formula = 24GB-2GB=22GB/2GB=11GB. Typical recommendation for a 24GB server is no more than 8GB Cache size. If running 24GB RAM on WFE, we should allocate 6GB (1024*6=6144 MB).
# CHANGE DC STATUS = DOWN
$instanceName = "SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()
# CHANGE DC CACHE SIZE (6GB)
Update-SPDistributedCacheSize -CacheSizeInMB 6144
# CHANGE DC SERVER STATUS = UP
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision()References
- https://technet.microsoft.com/en-us/library/jj219613.aspx
- https://nikpatel.net/2013/09/24/adjust-cache-size-of-the-sharepoint-2013-distributed-cache-service-part-i-overview/
- https://nikpatel.net/2013/09/26/adjust-cache-size-of-the-sharepoint-2013-distributed-cache-service-part-ii-using-set-afcachehostconfiguration-command/
PWA Refresh – Clone Project Server to Lower Env (DEV)
Cloning a project server environment is not a simple procedure. Wanted to share notes to help others. Duplicating the SQL databases is a good start. However, there are internal issues with duplicate GUID (same number already in use) that can create issues.
To resolve that hurdle I coded PowerShell which generates a new GUID and updates Site Collection (SPSite) via TSQL directly. https://github.com/spjeff/spadmin/tree/master/SPContentDatabase-Replace-Site-GUIDs
With a fresh new GUID in place we can follow steps in SharePoint Central Admin, PowerShell, and PWA Settings to bring the new PWA database pairs (SharePoint Content + Project Plans) online for customers. Word DOC included below with step-by-step detail. Cheers! ![]()
Download Checklist
| PWA Refresh Procedure.DOC |
Diagram
References
- https://github.com/spjeff/spadmin/tree/master/SPContentDatabase-Replace-Site-GUIDs
- https://epmsource.com/2013/05/08/migrating-project-derver-2013-database-between-environments/
- https://docs.microsoft.com/en-us/project/deploy-project-web-app-with-a-new-site-collection-project-server-2013
- https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/mount-spcontentdatabase
- https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/set-spprojectpermissionmode?view=sharepoint-ps
VIDEO – NEW SharePoint Admin Center
Today I noticed a new link in the top right of SharePoint Admin Center and recorded a brief video tour to highlight new features and compare to Classic Admin Center. URL is below in case you want to try on your O365 tenant name. Cheers! ![]()
Video
Modern URL – SharePoint Admin Center
Classic URL – SharePoint Admin Center
References
Poster – SharePoint List – When to Use What
The below visual captures ideas on SharePoint table data storage and when to use what. Rows and columns of data are common. Choosing the best hosting technology provides ease of support, quick time to market, performance, and scale for data growth.
SQL Server has good use cases, but comes with trade-offs including higher upfront setup effort and fewer end user controls (audit, search, version history). Can improve performance and reporting if those trade-offs are correctly addressed.
Select right tool for the job. Times for both.
Download PDF
Download VSDX
SharePoint – SQL Database Roles
Had a friend ask about SQL database Role Memberships that are needed for SharePoint Server on-premise. Examined SQL roles on my dev farm. Reference table below.
Get-SPServiceApplication | Get-SPDatabase | Select TypeName | SQL Permission Role | |
App Management | App Management Database | SP_DataAccess | |
N/A | Configuration Database | dbo, WSS_Content_Application_Pools | |
N/A | Content Database | SP_DataAccess | |
Microsoft SharePoint Foundation | Microsoft SharePoint Foundation Subscription Settings Database | SubscriptionSettingsService_Application_Pool | |
Secure Store | Microsoft.Office.SecureStoreService.Server.SecureStoreServiceDatabase | SP_DataAccess | |
User Profile | Microsoft.Office.Server.Administration.ProfileDatabase | SP_DataAccess | |
User Profile | Microsoft.Office.Server.Administration.SocialDatabase | SP_DataAccess | |
State Service | Microsoft.Office.Server.Administration.StateDatabase | WSS_Content_Application_Pools | |
User Profile | Microsoft.Office.Server.Administration.SynchronizationDatabase | db_owner | |
Search Service Application | Microsoft.Office.Server.Search.Administration.SearchAdminDatabase | SPSearchDBAdmin | |
Search Service Application | Microsoft.Office.Server.Search.Administration.SearchAnalyticsReportingDatabase | SPSearchDBAdmin | |
Search Service Application | Microsoft.Office.Server.Search.Administration.SearchGathererDatabase | SPSearchDBAdmin | |
Search Service Application | Microsoft.Office.Server.Search.Administration.SearchLinksDatabase | SPSearchDBAdmin | |
Machine Translation Service | Microsoft.Office.TranslationServices.QueueDatabase | SP_DataAccess | |
Word Automation Services | Microsoft.Office.Word.Server.Service.QueueDatabase | SP_DataAccess | |
PerformancePoint | Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceDatabase | SP_DataAccess | |
Business Data Connectivity | Microsoft.SharePoint.BusinessData.SharedService.BdcServiceDatabase | SP_DataAccess | |
Managed Metadata | Microsoft.SharePoint.Taxonomy.MetadataWebServiceDatabase | db_owner |
