Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

SharePoint

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. 

shades_smile

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 -Force

Download

SPRebootFarm.ps1

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

image

Cheers

shades_smile

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. 

shades_smile

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

image

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲