Protocol Handlers
Launch PowerShell scripts based on custom protocol handlers.
Protocol Handlers in the Admin Console
Protocol handlers allow you to trigger scripts when custom protocols are executed. Protocols can be executed locally and also from webpages as links.

Define a Protocol Handle

You can define protocol handlers in the protocolHandlers.ps1 file using the New-PSUProtocolHandler cmdlet. You will need to define the protocol name and script to execute.
1
New-PSUProtocolHandler -Script test.ps1 -Protocol psu
Copied!
To execute the protocol handler, you could include the following HTML tag in a web page.
1
<a href="psu://test">Click Me</a>
Copied!

Accessing URI Data

When a script is executed, you will receive the $ProtocolUri parameter. It will include the full URI that was invoked. For example, a script could take the URI and show a page.
1
param($ProtocolUri)
2
3
$Page = $ProtocolUri.Replace("psu://", "")
4
$Page
5
Show-PSUPage -Url $Page
Copied!