Advertisement
Guest User

vCheck-Potential-Style-Updates

a guest
Oct 25th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Retrieve Array Contents from Web Server
  2. #The idea was make a text file to add more categories and intern more columns
  3. #Semi-Dynamically even though this isn't as dynamic hopefully an
  4. #Update in the future.
  5. $Catagories = Get-Content \\Web-Server\Path\To\Text\catagories.txt |
  6. ? { $_ -like "CATAGORIES*" } |
  7. % { $_ -replace '.*?"([^"]*)".*', '$1' -split " " }
  8.  
  9. #Creating the Table of Contents
  10.    $TOCHTML += $TOCTableOpen
  11.    $TOCHTML += $TOCTROpenSectionsStyled
  12.  
  13.    <#
  14.       Fill Catagorie Names
  15.    #>
  16.    $CatagoryArr = @()
  17.    for($i=0; $i -lt $Catagories.Length; $i++)
  18.    {
  19.       $CatagoryNames = ($Catagories[$i] + " Overview")
  20.       $CatagoryArr += $CatagoryNames
  21.       $TOCHTML += ($TOCCatagoryNames -f $CatagoryNames)
  22.    }
  23.  
  24.    $TOCHTML += $TOCTRCloseSectionsStyled
  25.    $LinksArr = New-Object System.Collections.Generic.List[System.Object]
  26.    foreach ($pr in ($PluginResult | Where {$_.Details}))
  27.    {
  28.       $Links = $pr.PluginID, $pr.Title
  29.       $LinksArr.Add($Links)
  30.       <#Write-Host -ForegroundColor Yellow $LinksArr[0]
  31.       Write-Host -ForegroundColor Yellow $LinksArr[1]#>
  32.       <#$TOCHTML += ($TOCContentLinks -f $Links)#>
  33.    }
  34.    $TOCHTML += $TOCTRPluginsOpen
  35.    for($x=0; $x -lt $CatagoryArr.Length; $x++)
  36.    {
  37.      if($CatagoryArr[$x] -eq $CatagoryArr[0])
  38.      {
  39.         $TOCHTML += $TOCTDLinksOpen
  40.         #Place All Links for the Infrastructure Overview Here
  41.         $TOCHTML += ($TOCContentLinks -f $LinksArr[0])
  42.          }
  43.    }
  44.  
  45. $TOCHTML += $TOCTableOpen
  46.  
  47. $TOCTDLinksOpen = @"
  48.      <td style="text-align: left; height:auto;">
  49.         <ul style="list-style-type:none; margin-top:2px; margin-bottom:2px;">
  50. "@
  51.  
  52. #TOCContentLinks - HTML Code to Except Plugin and Title Information.
  53.  
  54. $TOCContentLinks = @"
  55.      <li style="list-style-type:none;">
  56.           <a style='font-size: 8pt' href='#{0}'>{1}</a>
  57.      </li>
  58. "@
  59.  
  60. $TOCTDLinksClose = @"
  61.     </ul>
  62.   </td>
  63. "@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement