Enable Session State
Scenario/Problem: You want to enable session state for your SharePoint Web Applications.
Solution: Use the Enable-SPSessionStateService cmdlet.
The Session State Service is not enabled by default, so there is no database to manage session state. This is actually the ASP.NET session state that can be leveraged by the SharePoint web applications in your farm.
To enable session state, execute the Enable-SPSessionStateService cmdlet with the DefaultProvision parameter. This automatically creates the session state database and enables the service using default values. Listing 18.1 shows an example command line.
Listing 18.1. Enabling Session State Using Defaults
Enable-SPSessionStateService -DefaultProvision
The default database ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access