spjeff / spbestwarmup

Tired of waiting for SharePoint pages to load? Want something easy to support? That works on all versions? This warmup script is for you!
2 stars 0 forks source link

Some URI suffixes throwing errors #37

Closed drullo closed 1 year ago

drullo commented 1 year ago

Some of the EndPoint URIs in my environment end with /https, or /http, or /secure, or /optimized. The URIs with these suffixes throw errors. Removing these suffixes resolves the errors in my environment. Is this a bug with the script, or is there something off with my farm?

This is the change that I've implemented to resolve the errors.

# Warm up Service Applications
    if (!$skipserviceapps) {
        Get-SPServiceApplication | ForEach-Object {$_.EndPoints | ForEach-Object {$_.ListenUris | ForEach-Object {
            $uri = $_.AbsoluteUri -Replace "/https$",$null -Replace "/http$",$null -Replace "/secure$",$null -Replace "/optimized$",$null
            NavigateTo $uri
        }}}
    }
spjeff commented 1 year ago

Excellent ideas Dan. Thank you. Updated with https://github.com/spjeff/spbestwarmup/commit/c40298d3f3436d6d061c66c9267944aa266242f8