The Session State Service in SharePoint 2013 is disabled by default. Even if you see the “Session State Service” running from Central admin, it might not be enabled.

The best way to check if it is enabled is to go to the web.config file and see if the Session module is there. But, remember, don’t modify the web.config file directly (that’s a no no).

How do we work with Session State in SharePoint 2013 – PowerShell!

Enable

Enable-SPSessionStateService -DatabaseName NameOfDatabase 

or

Enable-SPSessionStateService -DatabaseName NameOfDatabase DatabaseServer DatabaseServerName DatabaseCredentials CredentialsForDatabase

Ex:  Enable-SPSessionStateService -DatabaseName SP_SessionState

Disable

Disable-SPSessionStateService

or

Disable-SPSessionStateService -AssignmentCollection AssignmentCollectionForSharePoint ConfirmConfirmationSwitchParameter –WhatIf ConfirmationSwitchParameter

Reset Session State Service

Disable-SPSessionStateService
Enable-SPSessionStateService -DatabaseName SP_SessionState