This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/powershell:lts-ubuntu-18.04 | |
LABEL description="Universal - The ultimate platform for building web-based IT Tools" | |
EXPOSE 5000 | |
COPY [ "./stage", "/home/" ] | |
ENTRYPOINT ["./home/Universal/Universal.Server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Send-Socket { | |
param( | |
$IPAddress, | |
$Port, | |
$Command | |
) | |
$ipEndpoint = [System.Net.IPEndPoint]::new([System.Net.IPAddress]$IPAddress, $Port) | |
$socket = [System.Net.Sockets.Socket]::new($ipEndpoint.AddressFamily, 'Stream', 'TCP') | |
$socket.Connect($ipEndpoint) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module .\module.psm1 | |
function New-ComponentPage { | |
param( | |
$Page | |
) | |
New-Page | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-Detour | |
{ | |
param( | |
$Library, | |
$FunctionName, | |
[ScriptBlock]$Detour, | |
[String[]]$ReferencedAssemblies | |
) | |
#Download from easyhook.codeplex.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module UniversalDashboard | |
Get-UDDashboard | Stop-UDDashboard | |
$EI = New-UDEndpointInitialization -Module (Join-Path $PSScriptRoot 'influxdb.psm1') | |
$Cache:NetworkStats = @( | |
'\network adapter(*)\bytes received/sec' | |
'\network adapter(*)\bytes sent/sec' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$AuthMethod = New-UDAuthenticationMethod -Endpoint { | |
param([pscredential]$Credential) | |
New-UDAuthenticationResult -Success -UserName $Credential.UserName | |
} | |
$AuthPolicy = New-UDAuthorizationPolicy -Name "Policy" -Endpoint { | |
param($ClaimsPrincipal) | |
$UserName = $ClaimsPrincipal.Identity.Name | |
$Session:UserRole = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DBG]: PS C:\Users\adamr>> Get-UAScript -AppToken $AppToken.Token | |
Id : 1 | |
Name : Script.ps1 | |
Description : | |
CreatedTime : 1/31/2020 10:51:40 AM | |
ManualTime : 0 | |
CommitId : c45063d8f9f68805ffdf68231015aaaec47b13d6 | |
Content : Write-Host "Hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DBG]: PS C:\Users\adamr>> $Role = Get-UARole -Name Reader | |
[DBG]: PS C:\Users\adamr>> $Role | |
Id Name Description | |
-- ---- ----------- | |
3 Reader Readers have read-only access to UA. They cannot make changes to any entity within the system. | |
[DBG]: PS C:\Users\adamr>> $Identity = New-UAIdentity -Name Jeff -Role $Role | |
[DBG]: PS C:\Users\adamr>> $AppToken = Grant-UAAppToken -Identity $Identity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module UniversalAutomation | |
Import-Module UniversalAuotmation.Dashboard | |
Import-Module PSSecretStore | |
$ComputerName = "http://localhost:10000" | |
Start-UAServer -Port 10000 | |
$Cache:ComputerName = $ComputerName | |
Connect-UAServer -ComputerName $ComputerName |