Send Discord Messages from PowerShell Universal Triggers

PowerShell PowerShell Universal Discord

April 16, 2025

quote Discuss this Article

The PowerShell Universal Gallery provides a Discord Trigger module to send messages when certain events occur within PowerShell Universal. This blog post will walk you through setting up those triggers.

First, install the PowerShellUniversal.Triggers.Discord module in PowerShell Universal. Click Platform \ Gallery and search for Discord. Click install on the module.

In Discord, you will need to generate a web hook URL to provide to PowerShell Universal. Copy the web hook URL.

Back in PowerShell Universal, navigate to Platform \ Variables and create a new variable named DiscordWebhookUrl.

Finally, click Automation \ Triggers and create a new trigger. Select the trigger event type and the Send-PSUDiscordNotification function as the trigger script.

When jobs fail, they will now send a message to your configured webhook channel in your Discord server.

You can find out more information about the Discord trigger module on the Gallery’s GitHub repository.