Skip to content

An example module used in PowerShell Universal v4 to define resources.

License

Notifications You must be signed in to change notification settings

ironmansoftware/powershell-universal-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell Universal Module

An example module used in PowerShell Universal v4 to define resources.

.universal Folder

The .universal folder contains scripts that will define resources within PowerShell Universal. These resources will be read-only.

Resource Definitions

In order to properly load resources from a module, resources need to use the -Module and -Command parameters rather than any path-specific parameters.

New-PSUEndpoint -Url "/start" -Method @('GET') -Module "PSUModule" -Command "Start-Endpoint"

App Components

App components can be defined in modules and then used within apps. To support the App designer, you need to include the Component attribute with a name and description for your component.

function New-UDRedbox {
    [Component("Redbox", "A textbox with a red border.")]
    param(
        [Parameter()]
        [string]$Id
    )

    New-UDStyle -style "border: 2px solid red" -Content {
        New-UDTextbox -Id $Id
    }
}

About

An example module used in PowerShell Universal v4 to define resources.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published