├── LICENSE ├── README.md ├── images ├── ast.png ├── dsc.png ├── home.png ├── hostprocesses.png ├── modules.png ├── providers.png ├── repositories.png ├── scheduled-jobs.png └── variables.png └── src ├── PowerShellExplorer.psd1 ├── controls └── textarea.ps1 ├── dashboard.ps1 └── pages ├── ast.ps1 ├── dsc.ps1 ├── host-processes.ps1 ├── modules.ps1 ├── providers.ps1 ├── repository.ps1 ├── scheduled-jobs.ps1 ├── variables.ps1 └── verbs.ps1 /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Ironman Software, LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PowerShell Explorer 2 | 3 | ## [Marketplace](https://ironmansoftware.com/product/powershell-explorer-dashboard/) 4 | 5 | PowerShell Explorer shows information about the PowerShell environment on your machine. 6 | 7 | ![](./images/home.png) 8 | 9 | ## Installation 10 | 11 | ```powershell 12 | Install-Module PowerShellExplorer 13 | ``` 14 | 15 | ## Features 16 | 17 | ### Abstract Syntax Tree Navigation 18 | 19 | Enter a script and then navigate the AST of that script. 20 | 21 | ![](./images/ast.png) 22 | 23 | ## Desired State Configuration 24 | 25 | View the local configuration manager properties and local resources. 26 | 27 | ![](./images/dsc.png) 28 | 29 | ## Host Processes 30 | 31 | View processes hosting the PowerShell engine on your machine. 32 | 33 | ![](./images/hostprocesses.png) 34 | 35 | ## Modules 36 | 37 | View installed modules and install new modules from the PowerShell Gallery. 38 | 39 | ![](./images/modules.png) 40 | 41 | ## Providers 42 | 43 | Navigate PowerShell providers and their items. 44 | 45 | ![](./images/providers.png) 46 | 47 | ## Repositories 48 | 49 | View the registered PowerShellGet repositories. 50 | 51 | ![](./images/repositories.png) 52 | 53 | ## Scheduled Jobs 54 | 55 | View registered scheduled jobs. 56 | 57 | ![](./images/scheduled-jobs.png) 58 | 59 | ## Variables 60 | 61 | View variables defined in the current runspace. 62 | 63 | ![](./images/variables.png) 64 | -------------------------------------------------------------------------------- /images/ast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/ast.png -------------------------------------------------------------------------------- /images/dsc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/dsc.png -------------------------------------------------------------------------------- /images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/home.png -------------------------------------------------------------------------------- /images/hostprocesses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/hostprocesses.png -------------------------------------------------------------------------------- /images/modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/modules.png -------------------------------------------------------------------------------- /images/providers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/providers.png -------------------------------------------------------------------------------- /images/repositories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/repositories.png -------------------------------------------------------------------------------- /images/scheduled-jobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/scheduled-jobs.png -------------------------------------------------------------------------------- /images/variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/images/variables.png -------------------------------------------------------------------------------- /src/PowerShellExplorer.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-powershellexplorer/38ed4d1e39f74bef654ef84b5f11e6ca8942fb87/src/PowerShellExplorer.psd1 -------------------------------------------------------------------------------- /src/controls/textarea.ps1: -------------------------------------------------------------------------------- 1 | function New-UDTextarea { 2 | param( 3 | [Parameter()] 4 | [string]$Id, 5 | [Parameter()] 6 | [string]$Label, 7 | [Parameter()] 8 | [string]$Value 9 | ) 10 | 11 | New-UDElement -Tag "div" -Attributes @{ className = "input-field"} -Content { 12 | New-UDElement -Tag "textarea" -Attributes @{ className = "materialize-textarea"; value = $value} -Id $id 13 | New-UDElement -Tag "label" -Attributes @{ "for" = $id } -Content { $Label } 14 | } 15 | } -------------------------------------------------------------------------------- /src/dashboard.ps1: -------------------------------------------------------------------------------- 1 | function ConvertTo-String { 2 | param($Object) 3 | 4 | if ($null -eq $Object) { 5 | return [String]::Empty 6 | } 7 | 8 | return $Object.ToString() 9 | } 10 | 11 | function Start-PowerShellExplorer { 12 | param($Port = 8080, [Switch]$NoBrowser) 13 | 14 | $Pages = @() 15 | 16 | 17 | $ModuleEndpointSchedule = New-UDEndpointSchedule -Every 5 -Minute 18 | $ModuleEndpoint = New-UDEndpoint -Schedule $ModuleEndpointSchedule -Endpoint { 19 | $Cache:InstalledModules = Get-Module -ListAvailable 20 | } 21 | 22 | $Pages += New-UDPage -Name "Home" -Icon home -Content { 23 | New-UDElement -Tag div -Attributes @{ 24 | className = "center-align" 25 | } -Content { 26 | New-UDHeading -Size 1 -Text "PowerShell Explorer" 27 | New-UDHeading -Size 3 -Text "PowerShell environment dashboard" 28 | } 29 | 30 | New-UDLayout -Columns 3 -Content { 31 | New-UDCard -Title "Abstract Syntax Tree" -Content { 32 | "Navigate the abstract syntax tree of any script you enter" 33 | } -Links @(New-UDLink -Text "View" -Url "/AST-Explorer") 34 | 35 | New-UDCard -Title "Desired State Configuration" -Content { 36 | "Desired state configuration resources and status." 37 | } -Links @(New-UDLink -Text "View" -Url "/DSC") 38 | 39 | New-UDCard -Title "PowerShell Host Processes" -Content { 40 | "View processes hosting the PowerShell engine." 41 | } -Links @(New-UDLink -Text "View" -Url "/Host-Processes") 42 | 43 | New-UDCard -Title "PS Providers" -Content { 44 | "Navigate providers and their drives in a tree view." 45 | } -Links @(New-UDLink -Text "View" -Url "/Providers") 46 | 47 | New-UDCard -Title "Repositories" -Content { 48 | "View repositories registered with PowerShellGet" 49 | } -Links @(New-UDLink -Text "View" -Url "/Repositories") 50 | 51 | New-UDCard -Title "Scheduled Jobs" -Content { 52 | "View registered scheduled jobs" 53 | } -Links @(New-UDLink -Text "View" -Url "/Scheduled-Jobs") 54 | 55 | New-UDCard -Title "Variables" -Content { 56 | "View variables currently defined in the runspace." 57 | } -Links @(New-UDLink -Text "View" -Url "/Variables") 58 | 59 | New-UDCard -Title "Verbs" -Content { 60 | "View approved verbs." 61 | } -Links @(New-UDLink -Text "View" -Url "/Verbs") 62 | } 63 | } 64 | 65 | Get-ChildItem (Join-Path $PSScriptRoot "pages") | ForEach-Object { 66 | $Pages += . $_.FullName 67 | } 68 | 69 | $Initialization = New-UDEndpointInitialization -Module (Invoke-Expression "'$PSScriptRoot\controls\textarea.ps1'") -Function "ConvertTo-String" 70 | $Dashboard = New-UDDashboard -Title "PowerShell Explorer" -Pages $Pages -EndpointInitialization $Initialization 71 | Start-UDDashboard -Dashboard $Dashboard -Port $Port -Endpoint $ModuleEndpoint 72 | 73 | if (-not $NoBrowser) { 74 | Start-Process http://localhost:$Port 75 | } 76 | } -------------------------------------------------------------------------------- /src/pages/ast.ps1: -------------------------------------------------------------------------------- 1 | Import-Module "$PSScriptRoot\..\controls\textarea.ps1" 2 | 3 | New-UDPage -Name "AST Explorer" -Icon tree -Content { 4 | 5 | New-UDLayout -Columns 1 { 6 | New-UDHeading -Size 3 -Content { 7 | New-UDIcon -Icon tree 8 | " Abstract Syntax Tree Explorer" 9 | } 10 | New-UDHeading -Text "Enter a script in the below textbox to explore its abstract syntax tree." -Size 5 11 | } 12 | 13 | New-UDRow -Columns { 14 | New-UDColumn -Size 12 -Content { 15 | New-UDTextarea -Id "txtScript" -Label "Enter PowerShell Script" 16 | } 17 | } 18 | 19 | New-UDRow -Columns { 20 | New-UDColumn -Size 12 -Content { 21 | New-UDButton -Text "Parse" -OnClick { 22 | $Element = Get-UDElement -Id "txtScript" 23 | $ScriptBlock = [ScriptBlock]::Create($Element.Attributes["value"]) 24 | Set-UDElement -Id "astexplorer" -Content { 25 | $Session:Object = $ScriptBlock.Ast 26 | 27 | $Root = New-UDTreeNode -Name 'AST' -Id '$Session:Object' 28 | New-UDTreeView -ActiveBackgroundColor '#DFE8E4' -Node $Root -OnNodeClicked { 29 | param($Body) 30 | 31 | $Obj = $Body | ConvertFrom-Json 32 | 33 | $Object = Invoke-Expression $Obj.NodeId 34 | 35 | $Object | Get-Member -MemberType Properties | ForEach-Object { 36 | $Name = $_.Name 37 | New-UDTreeNode -Name "$Name" -Id "$($Obj.NodeId).$Name" 38 | } | ConvertTo-JsonEx 39 | 40 | Set-UDElement -Id "astproperties" -Content { 41 | New-UDGrid -Title "Properties" -Headers @("Name", "Value", "Type") -Properties @("Name", "Value", "Type") -Endpoint { 42 | if ($ArgumentList -eq $null) { 43 | return 44 | } 45 | 46 | $Items = $ArgumentList[0] | Get-Member -MemberType Properties | ForEach-Object { 47 | $Name = $_.Name 48 | $Value = $ArgumentList[0].$Name 49 | 50 | $ValueType = $null 51 | $ValueString = $null 52 | 53 | if ($Value -ne $null) { 54 | $ValueType = $Value.GetType().Name 55 | $ValueString = $Value.ToString() 56 | } 57 | 58 | [PSCustomObject]@{ 59 | Name = $Name 60 | Value = $Value 61 | Type = $ValueType 62 | } 63 | } 64 | 65 | @{ 66 | data = $Items 67 | recordsTotal = $Items.Length 68 | recordsFiltered = $Items.Length 69 | draw = $drawId 70 | } | ConvertTo-JsonEx -Depth 2 71 | 72 | } -ArgumentList $Object 73 | } 74 | } 75 | } 76 | } 77 | } 78 | } 79 | 80 | 81 | New-UDRow -Columns { 82 | New-UDColumn -Size 3 -Content { 83 | New-UDCard -Title "AST Nodes" -Content { 84 | New-UDElement -Tag "div" -Id "astexplorer" -Content {} 85 | } 86 | } 87 | New-UDColumn -Size 9 -Content { 88 | New-UDElement -Tag "div" -Id "astproperties" -Content {} 89 | } 90 | } 91 | 92 | } -------------------------------------------------------------------------------- /src/pages/dsc.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "DSC" -Icon superpowers -Content { 2 | New-UDLayout -Columns 1 { 3 | New-UDHeading -Size 3 -Content { 4 | New-UDIcon -Icon superpowers 5 | " Desired State Configuration" 6 | } 7 | New-UDHeading -Text "Desired state configuration resources and status." -Size 5 8 | } 9 | 10 | New-UDGrid -Title "Local Configuration Manager" -Headers @("Name", "Value") -Properties @("Name", "Value") -Endpoint { 11 | (Get-DscLocalConfigurationManager).PSObject.Properties | ForEach-Object { 12 | [PSCustomObject]@{ 13 | Name = ConvertTo-String $_.Name 14 | Value = ConvertTo-String $_.Value 15 | } 16 | } | Out-UDGridData 17 | } 18 | 19 | New-UDGrid -Title "DSC Resources" -Headers @("Name", "Module", "Version") -Properties @("Name", "Module", "Version") -Endpoint { 20 | Get-DscResource | ForEach-Object { 21 | [PSCustomObject]@{ 22 | Name = ConvertTo-String $_.Name 23 | Module = ConvertTo-String $_.ModuleName 24 | Version = ConvertTo-String $_.Version 25 | } 26 | } | Out-UDGridData 27 | } 28 | } -------------------------------------------------------------------------------- /src/pages/host-processes.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Host Processes" -Icon terminal -Content { 2 | 3 | New-UDLayout -Columns 1 { 4 | New-UDHeading -Size 3 -Content { 5 | New-UDIcon -Icon terminal 6 | " Host Processes" 7 | } 8 | New-UDHeading -Text "These are processes hosting the PowerShell engine." -Size 5 9 | } 10 | 11 | New-UDTable -Title "PowerShell Host Processes" -Headers @("Process Name", "Process ID", "Main Window Title", "Parent Process") -Endpoint { 12 | Get-PSHostProcessInfo | ForEach-Object { 13 | $ParentProcessId = (Get-CimInstance -ClassName "win32_process" -Filter "ProcessId = $($_.ProcessId)").ParentProcessId 14 | $ParentProcess = Get-Process -Id $ParentProcessId 15 | 16 | [PSCustomObject]@{ 17 | Name = ConvertTo-String $_.ProcessName 18 | Id = ConvertTo-String $_.ProcessName 19 | Title = ConvertTo-String $_.ProcessName 20 | ParentProcess = (ConvertTo-String $ParentProcess.Name) + " ($($ParentProcessId))" 21 | } 22 | 23 | } | Out-UDTableData -Property @( 24 | "Name", 25 | "Id", 26 | "Title" 27 | "ParentProcess" 28 | ) 29 | } 30 | } -------------------------------------------------------------------------------- /src/pages/modules.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Modules" -Icon mortar_board -Content { 2 | 3 | New-UDLayout -Columns 1 { 4 | New-UDHeading -Size 3 -Content { 5 | New-UDIcon -Icon mortar_board 6 | " Modules" 7 | } 8 | New-UDHeading -Text "Check out the modules installed on this box and install modules from the PowerShell Gallery." -Size 5 9 | } 10 | 11 | New-UDGrid -Title "Installed Modules" -Headers @("Name", "Version", "Path") -Properties @("Name", "Version", "Path") -Endpoint { 12 | # This cached variable is populated by a scheduled endpoint 13 | $Items = $Cache:InstalledModules 14 | 15 | @{ 16 | data = $Items 17 | recordsTotal = $Items.Length 18 | recordsFiltered = $Items.Length 19 | draw = $drawId 20 | } | ConvertTo-JsonEx -Depth 2 21 | } 22 | 23 | New-UDCard -Title "PowerShell Gallery" -Content { 24 | New-UDRow -Columns { 25 | New-UDColumn -Size 9 -Content { 26 | New-UDTextbox -Id "txtModuleName" -Label "Find Module" -Placeholder "Search text..." 27 | } 28 | New-UDColumn -Size 3 -Content { 29 | New-UDButton -Text "Find" -OnClick { 30 | $Element = Get-UDElement -Id "txtModuleName" 31 | 32 | Set-UDElement -Id "findModuleOutput" -Content { 33 | "Searching for $($Element.Attributes["value"])..." 34 | } 35 | 36 | $Modules = Find-Module -Filter $Element.Attributes["value"] 37 | Set-UDElement -Id "findModuleOutput" -Content { 38 | New-UDGrid -Title $Element.Attributes["value"] -Headers @("Name", "Version", "Install") -Properties @("Name", "Version", "Install") -Endpoint { 39 | 40 | if ($ArgumentList -eq $null) { return } 41 | 42 | $ArgumentList[0] | ForEach-Object { 43 | $Item = $_ 44 | [PSCustomObject]@{ 45 | Name = $_.Name 46 | Version = $_.Version 47 | Install = New-UDButton -Text "Install" -OnClick { 48 | 49 | Show-UDModal -Header { New-UDHeading -Text "Installing $($_.Name)" -Size 1 } -Content { 50 | New-UDRow { 51 | New-UDPreloader -Size large -Color green 52 | } 53 | } 54 | 55 | try 56 | { 57 | Install-Module -Name $Item.Name -Scope CurrentUser -Force 58 | } 59 | catch 60 | { 61 | Show-UDToast -Message $_ 62 | } 63 | 64 | Hide-UDModal 65 | 66 | } 67 | } 68 | } | Out-UDGridData 69 | } -ArgumentList $Modules 70 | } 71 | } 72 | } 73 | } 74 | New-UDRow -Columns { 75 | New-UDColumn -Size 12 -Content { 76 | New-UDElement -Tag "div" -Id "findModuleOutput" 77 | } 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /src/pages/providers.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Providers" -Icon hdd_o -Content { 2 | 3 | New-UDLayout -Columns 1 { 4 | New-UDHeading -Size 3 -Content { 5 | New-UDIcon -Icon hdd_o 6 | " PowerShell Providers" 7 | } 8 | New-UDHeading -Text "Navigate providers and their drives in a tree view." -Size 5 9 | } 10 | 11 | New-UDRow -Columns { 12 | New-UDColumn -Size 3 -Content { 13 | 14 | New-UDCard -Title "Providers" -Content { 15 | Get-PSProvider | ForEach-Object { 16 | $Root = New-UDTreeNode -Name $_.Name -Id "PSProvider:$($_.Name)" -Icon list 17 | New-UDTreeView -ActiveBackgroundColor '#DFE8E4' -Node $Root -OnNodeClicked { 18 | param($Body) 19 | 20 | $Obj = $Body | ConvertFrom-Json 21 | 22 | if ($Obj.NodeId.StartsWith("PSProvider")) { 23 | $Provider = $Obj.NodeId.Split(':')[1] 24 | 25 | $Drives = Get-PSDrive -PSProvider $Provider 26 | if ($Drives -ne $null) { 27 | $Drives | ForEach-Object { 28 | New-UDTreeNode -Name $_.Name -Id "Drive:$($_.Name)" -Icon hdd_o 29 | } 30 | } 31 | return 32 | } 33 | 34 | $NodeId = $Obj.NodeId 35 | if ($NodeId.StartsWith("Drive")) { 36 | $NodeId = $Obj.NodeId.Split(':')[1] + ":\" 37 | } 38 | 39 | Get-ChildItem -Path $NodeId | ForEach-Object { 40 | if ($NodeId -eq $_.FullName) { 41 | return 42 | } 43 | 44 | if ($_.PSIsContainer) { 45 | New-UDTreeNode -Name $_.Name -Id $_.FullName -Icon folder 46 | } else { 47 | New-UDTreeNode -Name $_.Name -Id $_.FullName -Icon file_text 48 | } 49 | } | ConvertTo-JsonEx 50 | 51 | Set-UDElement -Id "properties" -Content { 52 | New-UDGrid -Title $NodeId -Headers @("Name", "Value") -Properties @("Name", "Value") -Endpoint { 53 | $id = $ArgumentList[0] 54 | 55 | try { 56 | (Get-ItemProperty -Path $id -ErrorAction Stop).PSObject.Properties | ForEach-Object { 57 | [PSCustomObject]@{ 58 | Name = $_.Name 59 | Value = if ( $_.Value -eq $null) { "" } else { $_.Value.ToString() } 60 | 61 | } | Out-UDGridData 62 | } 63 | } 64 | catch { 65 | Get-ChildItem -Path $id | ForEach-Object { 66 | [PSCustomObject]@{ 67 | Name = $_.Name 68 | Value = if ( $_.Value -eq $null) { "" } else { $_.Value.ToString() } 69 | 70 | } | Out-UDGridData 71 | } 72 | } 73 | } -ArgumentList $NodeId 74 | } 75 | } 76 | } 77 | } 78 | } 79 | New-UDColumn -Size 9 -Content { 80 | New-UDElement -Tag "div" -Id "properties" -Content {} 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /src/pages/repository.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Repositories" -Icon rss -Content { 2 | 3 | New-UDLayout -Columns 1 { 4 | New-UDHeading -Size 3 -Content { 5 | New-UDIcon -Icon rss 6 | " Repositories" 7 | } 8 | New-UDHeading -Text "These are repositories registered with PowerShellGet." -Size 5 9 | } 10 | 11 | New-UDTable -Title "Repositories" -Headers @("Name", "Installation Policy", "Source Location") -Endpoint { 12 | Get-PSRepository | Out-UDTableData -Property @( 13 | "Name", 14 | "InstallationPolicy", 15 | "SourceLocation" 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /src/pages/scheduled-jobs.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Scheduled Jobs" -Icon "clock_o" -Content { 2 | New-UDLayout -Columns 1 { 3 | New-UDHeading -Size 3 -Content { 4 | New-UDIcon -Icon "clock_o " 5 | " Scheduled Jobs" 6 | } 7 | New-UDHeading -Text "Scheduled job status." -Size 5 8 | } 9 | 10 | New-UDGrid -Title "Scheduled Jobs" -Headers @("Name", "Command", "Enabled") -Properties @("Name", "Command", "Enabled") -Endpoint { 11 | Get-ScheduledJob | ForEach-Object { 12 | [PSCustomObject]@{ 13 | Name = ConvertTo-String $_.Name 14 | Command = ConvertTo-String $_.Command 15 | Enabled = ConvertTo-String $_.Enabled 16 | } 17 | } | Out-UDGridData 18 | } 19 | } -------------------------------------------------------------------------------- /src/pages/variables.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Variables" -Icon asterisk -Content { 2 | 3 | New-UDLayout -Columns 1 { 4 | New-UDHeading -Size 3 -Content { 5 | New-UDIcon -Icon asterisk 6 | " Variables" 7 | } 8 | New-UDHeading -Text "View variables currently defined in the runspace." -Size 5 9 | } 10 | 11 | New-UDTable -Title "Variables" -Headers @("Name", "Value") -Endpoint { 12 | Get-Variable | ForEach-Object { 13 | 14 | $Value = '$null' 15 | if ($_.Value -ne $null) { 16 | $Value = $_.Value.ToString() 17 | } 18 | 19 | [PSCustomObject]@{ 20 | Name = $_.Name 21 | Value = $Value 22 | } 23 | } | Out-UDTableData -Property @("Name", "Value") 24 | } 25 | } -------------------------------------------------------------------------------- /src/pages/verbs.ps1: -------------------------------------------------------------------------------- 1 | New-UDPage -Name "Verbs" -Icon language -Content { 2 | 3 | New-UDLayout -Columns 1 { 4 | New-UDHeading -Size 3 -Content { 5 | New-UDIcon -Icon language 6 | " Verbs" 7 | } 8 | New-UDHeading -Text "View approved verbs" -Size 5 9 | } 10 | 11 | New-UDTable -Title "Verbs" -Headers @("Verb", "Group") -Endpoint { 12 | Get-Verb | Out-UDTableData -Property @("Verb", "Group") 13 | } 14 | } --------------------------------------------------------------------------------