├── LICENSE ├── PortalGenerator.ps1 ├── README.md ├── Sample1.png ├── Sample2.png ├── config.csv ├── index.css └── newCSSSamples.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Bronson Magnan 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 | -------------------------------------------------------------------------------- /PortalGenerator.ps1: -------------------------------------------------------------------------------- 1 | #Admin Portal Generator 2 | param( 3 | [parameter(Mandatory)][validateNotNullOrEmpty()][string]$ConfigFile, 4 | [parameter(Mandatory)][validateNotNullOrEmpty()][string]$WebSiteFile 5 | ) 6 | 7 | 8 | class HTMLImageLink { 9 | [string]$ALTText 10 | [string]$URI 11 | [string]$Image 12 | hidden [boolean]$NewTab 13 | HTMLImageLink ([string]$ALTText,[string]$URI,[string]$Image,[boolean]$NewTab){ 14 | $this.ALTText = $ALTText 15 | $this.URI = $URI 16 | $this.Image = $Image 17 | $this.NewTab = $NewTab 18 | } 19 | [string]GetTargetCode(){ 20 | if ($this.NewTab) { return ' target="_blank"'} else { return ""} 21 | } 22 | [string]GetHTML(){ 23 | return "`"$($this.ALTText)`"" 24 | } 25 | } 26 | 27 | class AdminPortalItem : HTMLImageLink{ 28 | [string]$Category 29 | AdminPortalItem([string]$Category,[string]$Label, [string]$Image, [string]$URI) : base ($Label,$URI,$Image,$true){ 30 | $this.Category = $Category 31 | } 32 | [string[]]GetHTML() { 33 | $build = @() 34 | $build += '
' 35 | $build += $(' ' + ([HTMLImageLink]$this).GetHTML() ) 36 | $build += '

' + $this.ALTText + '

' 37 | $build += '
' 38 | return $build 39 | } 40 | 41 | } 42 | 43 | class AdminPortalPage { 44 | [AdminPortalItem[]]$Database 45 | AdminPortalPage(){ 46 | } 47 | [void]AddRecord([AdminPortalItem]$Record){ 48 | $this.Database += $Record 49 | } 50 | [AdminPortalItem[]]GetRecordsByCategory([string]$key){ 51 | return $this.Database.where({$_.Category -eq $key}) 52 | } 53 | [string[]]EncapsulateCategory([string]$key){ 54 | [AdminPortalItem[]]$recordSet = $this.GetRecordsByCategory($key) 55 | $build = @() 56 | $build += '

' + $key + '

' 57 | $build += '
' 58 | foreach ($Record in $recordSet) { 59 | $build += $record.GetHTML() 60 | } 61 | $build += '
' 62 | return $build 63 | } 64 | [string[]]GetAllCategoriesInSet(){ 65 | return ($this.Database).Category | Sort-Object | Select-Object -Unique 66 | } 67 | [string[]]GetHtml() { 68 | $Build = @() 69 | $build += '' 70 | $build += '' 71 | $build += '' 72 | $build += '' 73 | $build += '' 74 | $build += '' 75 | foreach ($Category in $this.GetAllCategoriesInSet()) { 76 | $build += $this.EncapsulateCategory($Category) 77 | } 78 | $build += '' 79 | $build += '' 80 | return $Build 81 | } 82 | } 83 | 84 | 85 | $DB = [AdminPortalPage]::new() 86 | 87 | $LoadConfig = get-content -Path $ConfigFile | Convertfrom-csv 88 | foreach ($Config in $LoadConfig){ 89 | $DB.AddRecord([AdminPortalItem]::new($config.Category,$config.ALTText,$config.Image,$config.URI)) 90 | } 91 | 92 | $db.GetHtml() | Set-Content -Path $WebSiteFile 93 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AdminPortal 2 | Admin Portal Aggregator 3 | 4 | New CSS file supplied by Trond @XenAppBlog 5 | 6 | In your environment you may have hundreds of the following: 7 | 1. Out of band server mangement cards 8 | 2. UPS management cards 9 | 3. Switches 10 | 4. Printers 11 | 5. SaaS management portals 12 | 6. Self-hosted application management portals 13 | 14 | This is a tool to aggregate all of these items together into a single IIS site. 15 | 16 | Requirements: 17 | 1. IIS server 18 | 2. A collection of 64x64 pixel icons to represent each portal, hint: start with a default one, and add them over time. 19 | 3. This script that generates the index.htm file 20 | 4. The index.css file, which you may retheme to your pleasure. 21 | 5. The config.csv file, which contains the information for each portal you want to add. I thought CSV would be the best format because alot of admins have this type of information already stored in Excel. 22 | 23 | This script when supplied with a configuration CSV file will create a webpage that aggregates administrative web portals. 24 | 25 | Each record in the CSV is as follows: 26 | 1. Category: Which tile set the portal link will be grouped in, i.e. Site:LasVegas, or SaaS_Apps 27 | 2. ALTText: This is the text description of the portal link 28 | 3. URI: This is the actual webaddress of the portal 29 | 4. Image: The relative path to the image file 30 | 31 | Put the powershell script in the website folder and run it as a scheduled task, or as needed to refresh the updated CSV. 32 | 33 | Sample usage 34 | ```.\PortalGenerator.ps1 -ConfigFile .\config.csv -WebSiteFile .\index.html``` 35 | 36 | Screenshot: 37 | ![1](https://github.com/BronsonMagnan/AdminPortal/blob/master/newCSSSamples.png) 38 | 39 | -------------------------------------------------------------------------------- /Sample1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BronsonMagnan/AdminPortal/f5db2163e9ac17610a52dd8ed51a631c806b142b/Sample1.png -------------------------------------------------------------------------------- /Sample2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BronsonMagnan/AdminPortal/f5db2163e9ac17610a52dd8ed51a631c806b142b/Sample2.png -------------------------------------------------------------------------------- /config.csv: -------------------------------------------------------------------------------- 1 | #TYPE AdminPortalItem 2 | "Category","ALTText","URI","Image" 3 | "Datacenter","App-V Reporting","https://xyzappvrpt01.corp.contoso.com/reports","img\appv.jpg" 4 | "Datacenter","uberAgent","http://xyzsplunk01.corp.contoso.com:8000","img\uberagent.png" 5 | "Datacenter","Windows Admin Center","https://xyzcon01.corp.contoso.com/","img\wac.png" 6 | "Datacenter","Advanced Threat Analytics","https://xyzata01.corp.contoso.com/","img\msata.png" 7 | "Datacenter","Exchange Admin Center","https://mail.contoso.com/ecp","img\logo_Exchange.svg" 8 | "Datacenter","ThinPrint Management","http://xyztprintlic01:4004/fw/Account/LogOn?ReturnUrl=%2ffw%2f","img\thinprint.png" 9 | "Datacenter","SCOM Web Portal","https://scomconsole.contoso.com/OperationsManager/","img\monitoring.png" 10 | "Datacenter","App-V Management","https://appvmgmt.contoso.com:8000/Console/Packages","img\appv.jpg" 11 | "Hybrid_SaaS","Azure Portal","https://portal.azure.com","img\logo_azure.svg" 12 | "Hybrid_SaaS","M365 Portal","https://portal.office.com","img\default.svg" 13 | "Hybrid_SaaS","Adobe","https://adminconsole.adobe.com/","img\adobe.png" 14 | "Hybrid_SaaS","AutoDesk","https://manage.autodesk.com","img\autodesk.jpg" 15 | "Site:LasVegas","HVC1 iDrac","https://10.2.0.103","img\idrac.png" 16 | "Site:LasVegas","HVC2 iDrac","https://10.2.0.101","img\idrac.png" 17 | "Site:LasVegas","HP SANA","http://10.2.0.196/","img\HP.png" 18 | "Site:LasVegas","HP SANB","http://10.2.0.197/","img\HP.png" 19 | "Site:LasVegas","HV7 IMM","https://10.2.0.16","img\LenovoIMM.png" 20 | "Site:LasVegas","HV8 IMM","https://10.2.0.10","img\LenovoIMM.png" 21 | "Site:LasVegas","HV9 IMM","https://10.2.0.19","img\LenovoIMM.png" 22 | "Site:LasVegas","UPS1","http://10.2.0.106/","img\tripplite.png" 23 | "Site:LasVegas","UPS2","","img\tripplite.png" 24 | "Site:LasVegas","KIP7570","http://10.2.0.37/","img\kipprinter.png" 25 | "Site:LasVegas","Xerox C70","https://10.2.0.38","img\xerox.png" 26 | "Site:LasVegas","Xerox C8045 East","https://10.2.0.39","img\xerox.png" 27 | "Site:LasVegas","Xerox C8045 West","http://10.2.0.28/","img\xerox.png" 28 | "Site:LasVegas","HP T520","https://10.2.0.34/","img\HPPrinter.png" 29 | "Site:LasVegas","Dell S5840cdn","http://10.2.0.32/","img\dellprinter.png" 30 | "Site:Redmond","Ricoh Plotter","http://10.1.0.29","img\ricoh.png" 31 | "Site:Redmond","Xerox C8045","http://10.1.0.28/","img\xerox.png" 32 | "Site:Redmond","HVFM1 IMM","https://10.1.0.43/","img\LenovoIMM.png" 33 | "Site:Redmond","UPS1","https://10.1.0.22/","img\tripplite.png" 34 | -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #3180AA; 3 | font-family: "Segoe UI Webfont",-apple-system,"Helvetica Neue","Lucida Grande","Roboto","Ebrima","Nirmala UI","Gadugi","Segoe Xbox Symbol","Segoe UI Symbol","Meiryo UI","Khmer UI","Tunga","Lao UI","Raavi","Iskoola Pota","Latha","Leelawadee","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","Estrangelo Edessa","Microsoft Himalaya","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Yi Baiti","Mongolian Baiti","MV Boli","Myanmar Text","Cambria Math"; 4 | margin-right: 100px; 5 | margin-left: 100px; 6 | } 7 | 8 | h1 { 9 | color: navy; 10 | margin-left: 20px; 11 | } 12 | 13 | .grid-container { 14 | display: grid; 15 | grid-template-columns: 200px 200px 200px 200px 200px 200px 200px 200px; 16 | justify-content: space-evenly; 17 | background-color: #3180AA; 18 | padding: 0px; 19 | border: 0px solid rgba(0, 0, 0, 0.8) 20 | } 21 | 22 | .grid-item { 23 | background-color: white; 24 | border: 5px solid rgba(49, 128, 170); 25 | padding: 10px; 26 | font-size: 15px; 27 | text-align: center; 28 | } 29 | 30 | .grid-icon { 31 | width:64x; 32 | height:64px; 33 | border:0 34 | } 35 | 36 | .grid-label { 37 | font-size: 15px 38 | } 39 | 40 | .grid-container-label { 41 | font-size: 25px; 42 | text-align: center; 43 | color: white; 44 | } 45 | -------------------------------------------------------------------------------- /newCSSSamples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BronsonMagnan/AdminPortal/f5db2163e9ac17610a52dd8ed51a631c806b142b/newCSSSamples.png --------------------------------------------------------------------------------