Skip to content
GitHub Action edited this page Oct 16, 2024 · 9 revisions

Usage

Parameters

Parameter Description
-ConfigFile Specifies the path to the configuration file.
-EnableSmtp Sends the results via email using SMTP.
-Install Add the SPSWeather script in task scheduler
-InstallAccount Specifies the service account who runs the scheduled task
-Uninstall Remove the SPSWeather script from task scheduler

Basic Usage Example

.\SPSWeather.ps1 -ConfigFile 'contoso-PROD.json'

Enable Email Notifications Example

.\SPSWeather.ps1 -ConfigFile 'contoso-PROD.json' -EnableSmtp

Installation Usage Example

.\SPSWeather.ps1 -ConfigFile 'contoso-PROD.json' -Install -InstallAccount (Get-Credential)

Uninstallation Usage Example

.\SPSWeather.ps1 -ConfigFile 'contoso-PROD.json' -Uninstall

Clone this wiki locally