├── LICENSE ├── README.md ├── images ├── hardware.png ├── icon.png ├── network.png ├── overview.png └── storage.png ├── ud-bginfo.ps1 ├── ud-bginfo.psd1 └── ud-bginfo.psm1 /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 | # UDBGInfo - [Marketplace](https://ironmansoftware.com/product/ud-bginfo/) 2 | 3 | Web-based [BGInfo](https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo) built on [Universal Dashboard](https://ironmansoftware.com/universal-dashboard). 4 | 5 | - Lightweight 6 | - Access from anywhere 7 | - Updates every 60 seconds 8 | 9 | ``` 10 | Install-Module 'ud-bginfo' 11 | ``` 12 | 13 | ## Overview 14 | 15 | Basics about a machine. OS version, logon information and boot time. 16 | 17 | ![](./images/overview.png) 18 | 19 | ## Hardware 20 | 21 | Hardware information such as CPU model, drive model and temperature readings. 22 | 23 | ![](./images/hardware.png) 24 | 25 | ## Storage 26 | 27 | Storage space for each drive. 28 | 29 | ![](./images/storage.png) 30 | 31 | ## Network 32 | 33 | Network information such as IP Address, gateway and DHCP server. 34 | 35 | ![](./images/network.png) 36 | -------------------------------------------------------------------------------- /images/hardware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-bginfo/6f100750ff9dc352c715940b213403c7d492cc60/images/hardware.png -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-bginfo/6f100750ff9dc352c715940b213403c7d492cc60/images/icon.png -------------------------------------------------------------------------------- /images/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-bginfo/6f100750ff9dc352c715940b213403c7d492cc60/images/network.png -------------------------------------------------------------------------------- /images/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-bginfo/6f100750ff9dc352c715940b213403c7d492cc60/images/overview.png -------------------------------------------------------------------------------- /images/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-bginfo/6f100750ff9dc352c715940b213403c7d492cc60/images/storage.png -------------------------------------------------------------------------------- /ud-bginfo.ps1: -------------------------------------------------------------------------------- 1 | Get-UDDashboard | Stop-UDDashboard 2 | 3 | Import-Module (Join-Path $PSScriptRoot 'ud-bginfo.psm1') -Force 4 | 5 | $Content = { 6 | New-UDRow -Endpoint { 7 | New-UDColumn -Size 6 -Content { 8 | New-OverviewCard 9 | } 10 | New-UDColumn -Size 6 -Content { 11 | New-StorageCard 12 | } 13 | } -AutoRefresh -RefreshInterval 60 14 | New-UDRow -Endpoint { 15 | New-UDColumn -Size 6 -Content { 16 | New-HardwareCard 17 | } 18 | New-UDColumn -Size 6 -Content { 19 | New-NetworkCard 20 | } 21 | } -AutoRefresh -RefreshInterval 60 22 | } 23 | 24 | $EndpointInitialization = New-UDEndpointInitialization -Module "$PSScriptRoot\ud-bginfo.psm1" 25 | 26 | 27 | $Dashboard = New-UDDashboard -Title "$env:ComputerName - BGINFO" -Content $Content -EndpointInitialization $EndpointInitialization 28 | 29 | Start-UDDashboard -Port 10000 -Dashboard $Dashboard -------------------------------------------------------------------------------- /ud-bginfo.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ironmansoftware/ud-bginfo/6f100750ff9dc352c715940b213403c7d492cc60/ud-bginfo.psd1 -------------------------------------------------------------------------------- /ud-bginfo.psm1: -------------------------------------------------------------------------------- 1 | function New-UDProgressMetric { 2 | param($Total, $Value, $Metric, $Label, [Switch]$HighIsGood) 3 | 4 | $Percent = [Math]::Round(($Value / $Total) * 100) 5 | New-UDElement -Tag "h5" -Content { $Label } 6 | 7 | New-UDElement -Tag "div" -Attributes @{ className = "row" } -Content { 8 | New-UDElement -Tag "span" -Attributes @{ className = "grey-text lighten-1" } -Content { "$Percent% - $($Value.ToString('N')) of $($Total.ToString('N')) $Metric" } 9 | } 10 | 11 | if ($HighIsGood) { 12 | if ($Percent -lt 20) { 13 | $Color = 'red' 14 | } 15 | elseif ($Percent -gt 25 -and $Percent -lt 75) { 16 | $Color = 'yellow' 17 | } else { 18 | $Color = 'green' 19 | } 20 | 21 | } else { 22 | if ($Percent -lt 50) { 23 | $Color = 'green' 24 | } 25 | elseif ($Percent -gt 50 -and $Percent -lt 75) { 26 | $Color = 'yellow' 27 | } else { 28 | $Color = 'red' 29 | } 30 | 31 | } 32 | 33 | 34 | New-UDElement -Tag "div" -Attributes @{ className = 'progress grey' } -Content { 35 | New-UDElement -Tag "div" -Attributes @{ className = "determinate $color"; style = @{ width = "$Percent%"} } 36 | } 37 | } 38 | 39 | function New-UDProgress { 40 | param($Percent, $Label) 41 | 42 | New-UDElement -Tag "h5" -Content { $Label } 43 | 44 | if ($Percent -lt 50) { 45 | $Color = 'green' 46 | } 47 | elseif ($Percent -gt 50 -and $Percent -lt 75) { 48 | $Color = 'yellow' 49 | } else { 50 | $Color = 'red' 51 | } 52 | 53 | New-UDElement -Tag "div" -Attributes @{ className = "row" } -Content { 54 | New-UDElement -Tag "span" -Attributes @{ className = "grey-text lighten-1" } -Content { "$Percent%" } 55 | } 56 | 57 | New-UDElement -Tag "div" -Attributes @{ className = 'progress grey' } -Content { 58 | New-UDElement -Tag "div" -Attributes @{ className = "determinate $color"; style = @{ width = "$Percent%"} } 59 | } 60 | } 61 | 62 | function ConvertTo-Fahrenheit { 63 | param($Value) 64 | 65 | (($value /10 -273.15) *1.8 +32) 66 | } 67 | 68 | function New-HardwareCard { 69 | $CPU = Get-WMIObject -Class Win32_Processor 70 | $drives = Get-WMIObject -Class win32_diskdrive 71 | 72 | 73 | New-UDCard -Title "Hardware" -Content { 74 | New-UDLayout -Columns 1 -Content { 75 | New-UDElement -Tag "div" -Content { 76 | " CPU: $($CPU.Name)" 77 | } 78 | foreach($drive in $drives) { 79 | New-UDElement -Tag "div" -Content { 80 | " Drive: $($drive.caption)" 81 | } 82 | } 83 | } 84 | } 85 | } 86 | 87 | function New-OverviewCard { 88 | $OS = Get-WMIObject -Class Win32_OperatingSystem 89 | 90 | 91 | New-UDCard -Title "$Env:ComputerName Overview" -Content { 92 | New-UDLayout -Columns 1 -Content { 93 | New-UDElement -Tag "div" -Content { 94 | " Boot Time: $($OS.ConvertToDateTime($OS.LastBootupTime))" 95 | } 96 | New-UDElement -Tag "div" -Content { 97 | " OS: $($OS.Caption)" 98 | } 99 | New-UDElement -Tag "div" -Content { 100 | " Logon Server: $Env:LOGONSERVER" 101 | } 102 | New-UDElement -Tag "div" -Content { 103 | " User Domain: $Env:USERDOMAIN" 104 | } 105 | New-UDElement -Tag "div" -Content { 106 | " Username: $Env:USERNAME" 107 | } 108 | } 109 | } 110 | } 111 | 112 | function New-NetworkCard { 113 | $EnabledAdapters = (Get-wmiObject Win32_networkAdapterConfiguration | ?{$_.IPEnabled}) 114 | $DefaultGateway = $EnabledAdapters.DefaultIPGateway | Where-Object { -not [String]::IsNullOrEmpty($_)} 115 | $DHCPServer = $EnabledAdapters.DHCPServer | Where-Object { -not [String]::IsNullOrEmpty($_)} 116 | $IPAddress = $EnabledAdapters.IPAddress | Where-Object { -not [String]::IsNullOrEmpty($_)} 117 | $DNSServer = $EnabledAdapters.DNSServerSearchOrder | Where-Object { -not [String]::IsNullOrEmpty($_)} 118 | 119 | New-UDCard -Title "Network" -Content { 120 | New-UDLayout -Columns 1 -Content { 121 | New-UDElement -Tag "div" -Content { 122 | $IPAddress = [String]::Join(', ', $IPAddress) 123 | " IP Address: $IPAddress " 124 | } 125 | New-UDElement -Tag "div" -Content { 126 | $DefaultGateway = [String]::Join(', ', $DefaultGateway) 127 | " Default Gateway: $DefaultGateway" 128 | } 129 | New-UDElement -Tag "div" -Content { 130 | " DHCP Server: $DHCPServer" 131 | } 132 | New-UDElement -Tag "div" -Content { 133 | $DNSServer = [String]::Join(', ', $DNSServer) 134 | " DNS Server: $DNSServer" 135 | } 136 | } 137 | } 138 | } 139 | 140 | function New-StorageCard { 141 | $Disks = Get-WMIObject -Class Win32_LogicalDisk | Where {$_.DriveType -ne "5"} 142 | 143 | New-UDCard -Title 'Storage' -Content { 144 | foreach($disk in $disks) { 145 | New-UDElement -Tag "row" -Content { 146 | New-UDProgressMetric -Value ($Disk.FreeSpace /1GB) -Total ($Disk.Size / 1GB) -Metric "GBs" -Label "$($Disk.DeviceID) - Free Space" -HighIsGood 147 | } 148 | } 149 | } 150 | } 151 | 152 | function New-Resource { 153 | $OperatingSystem = Get-WMIObject -Class Win32_OperatingSystem 154 | $CPU = Get-WMIObject -Class Win32_Processor 155 | 156 | 157 | New-UDCard -Title "Host" -Content { 158 | New-UDElement -tag "h4" -Content { 159 | "System Information" 160 | } 161 | New-UDElement -tag "div" -Attributes @{ className = "row"} -Content { 162 | New-UDElement -Tag "i" -Attributes @{ className = "fa fa-windows"} 163 | " " 164 | $OperatingSystem.Caption 165 | } 166 | New-UDElement -Tag "div" -Attributes @{ className = "row"} -Content { 167 | New-UDProgressMetric -Value ($OperatingSystem.FreePhysicalMemory /1MB) -Total ($OperatingSystem.TotalVisibleMemorySize / 1MB) -Metric "GBs" -Label "Memory" 168 | } 169 | New-UDElement -Tag "div" -Attributes @{ className = "row"} -Content { 170 | New-UDProgress -Percent $CPU.LoadPercentage -Label "CPU Usage" 171 | } 172 | 173 | 174 | } 175 | } 176 | --------------------------------------------------------------------------------