Enable-CsOnlineSessionForReconnection is available in v7 of the SkypeOnlineConnector.
Could you incorporate this one?
$moduleVersion = (Get-Module -Name SkypeOnlineConnector).Version
Write-Host "SkypeOnlineConnector Module is v$ModuleVersion"
if ($moduleVersion.Major -ge "7") # v7 and higher can run Session Limit Extension
{
Enable-CsOnlineSessionForReconnection -WarningAction SilentlyContinue
Write-Verbose -Message "The PowerShell session reconnects and authenticates, allowing it to be re-used without having to launch a new instance to reconnect." -Verbose
}
else
{
Write-Host "Your Session will time out after 60 min. - To prevent this, Update this module to v7 or higher, then run Enable-CsOnlineSessionForReconnection"
Write-Host "You can download the Module here: https://www.microsoft.com/download/details.aspx?id=39366"
}