-
Notifications
You must be signed in to change notification settings - Fork 4
Usage
GitHub Action edited this page May 18, 2026
·
4 revisions
SPSWakeUp.ps1 is a PowerShell script designed to wake up SharePoint sites by sending HTTP requests to their URLs. This ensures that the sites are preloaded into memory, reducing the initial load time for users.
The script can use two execution paths:
- PowerShell 7.x path via
SPSWakeUp-pwsh.ps1(preferred when available). - PowerShell 5.1 fallback path when
pwshis not installed.
- PowerShell 5.1 or later.
- PowerShell 7.x (optional but recommended).
- Run from a SharePoint Web Front End (WFE) server.
- Do not run from a server with the Search MinRole.
- Necessary permissions to access the SharePoint sites.
- Ensure scripts are placed in the same directory and accessible by the user:
SPSWakeUP.ps1SPSWakeUp-pwsh.ps1
The script supports the following parameters:
| Parameter | Description |
|---|---|
-Action |
(Optional) Use the Action parameter equal to Install if you want to add the warmup script in taskscheduler, InstallAccount parameter need to be set. Use the Action parameter equal to Uninstall if you want to remove the warmup script from taskscheduler. Use the Action parameter equal to AdminSitesOnly if you want to warmup the Central Administration Site collection |
-InstallAccount |
(Optional) Need parameter InstallAccount whent you use the Action parameter equal to Install. |
-Transcript |
(Optional) Use the boolean Transcript parameter if you want to start Transcrit PowerShell Feature. |
.\SPSWakeUP.ps1 -Action AdminSitesOnly.\SPSWakeUP.ps1.\SPSWakeUP.ps1 -Action Install -InstallAccount (Get-Credential).\SPSWakeUP.ps1 -Action Uninstall.\SPSWakeUP.ps1 -Transcript:$TrueThe script logs the status of each request, including success or failure, and saves it to the specified log file or the default location.
- If a site URL is unreachable, the script will log the error and continue with the next URL.
- Ensure the provided credentials have access to the specified SharePoint sites.
- Use HTTPS URLs for secure communication.
- If your environment only uses PowerShell 5.1, the script still works through fallback mode.
- Test the script in a non-production environment before deploying it widely.
For issues or questions, please contact the script maintainer or refer to the project documentation.