PowerShell App Tools
A module for working with PowerShell Apps.
Commands
New-UDCenter
Centers content in an App.
New-UDCenter -Content {
New-UDButton -Text 'Centered Button'
}
New-UDRight
Right aligns content in an App.
New-UDRight -Content {
New-UDButton -Text 'Right Aligned Button'
}
New-UDConfirm
Prompts the user to confirm an action.
if(New-UDConfirm -Text "Do you want to delete this item?") {
# Delete the item
}
New-UDLineBreak
Adds a line break to the content.
New-UDTypography -Text 'Line 1'
New-UDLineBreak
New-UDTypography -Text 'Line 2'
Show-UDEventData
Displays the event data for a component.
New-UDButton -Text 'Show Event Data' -OnClick {
Show-UDEventData
}
Reset-UDPage
Refreshes the current page.
New-UDButton -Text 'Reset Page' -OnClick {
Reset-UDPage
}
Show-UDObject
Displays an object as JSON.
$Object = @{
Name = 'Adam'
Age = 30
}
Show-UDObject -Object $Object
Get-UDCache
Lists all items in $Cache:
scope.
$CacheItems = Get-UDCache
Show-UDObject -Object $InputObject
Show-UDVariable
Displays a variable.
$Variable = 'Hello'
Show-UDVariable -Name "Variable"
Show-UDThemeColorViewer
Displays the current theme colors.
Show-UDThemeColorViewer
ConvertTo-UDJson
Converts an object to JSON.
Installation Options
Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet. More info
PS > Install-PSResource Apps.PowerShell.Tools
Install within the PowerShell Universal v5 admin console. More Info
![PowerShell Universal Library](https://docs.powershelluniversal.com/~gitbook/image?url=https%3A%2F%2F1373299915-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8F6PrkNTG8Y34hADzKOL%252Fuploads%252FP0tvQofIJk47KA4CYuGB%252Fimage.png%3Falt%3Dmedia%26token%3D116a8bb8-43d1-43e6-a7db-6e03437abfd1&width=768&dpr=1&quality=100&sign=dc7fce58&sv=1)
Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies.
Download the raw nupkg file