about_PowerWeb.help.txt
Using Module PowerWeb
#Youtube video: https://youtu.be/o37AKtrpxuk $html = [html]::new() $html.title = "Webpage" $html.refresh = 5000 $navnames = "Avengers","IronMan","Wolverine","Nick Fury","She-Hulk","Sword","Shield" $links = "www.AvengersHomePage.com", "www.Fantastic4/Reed Richards.com","www.smoothoperation.com" $page1 = Get-Hbar -Headers $navnames -name SpecOps -backgroundcolor Purple |Add-Weblinks -links $links $page2 = Set-ActiveNavbar -navhtml $page1 -activename SpecOps -linenumber 2 $page3 = Set-ActiveNavbar -navhtml $page1 -activename SpecOps -linenumber 3 $page4 = Set-ActiveNavbar -navhtml $page1 -activename SpecOps -linenumber 4 $Table1 = Get-hotfix|select -first 30 installedby, installedon,hotfixid $Table2 = Get-hotfix|select -first 5 installedby, hotfixid, machinename $Table3 = gwmi win32_useraccount|select AccountType, Caption, Domain, SID, Name, Fullname $Table4 = Get-Service|select -First 50 Status, Name, Displayname $Table5 = Get-CimInstance Cim_product|foreach-object{ [pscustomobject]@{ name = $_.Name vendor = $_.Vendor version = $_.Version caption = $_.Caption computer = $env:COMPUTERNAME install = $_.InstallDate } } [array]$tablenames = "Patch1","Patch2","UsersAcc","Services","Schedule" Get-Html -data $Table1, $Table2, $Table3, $Table4,$Table5 -TableName $tablenames $test1 = webclass -table $Patch1 -id Wolverine -textcolor orange -Addsort -Addsearch -caption "Hotfix30" $test2 = webclass -table $Patch2 -id CaptAmerica -Addsort -Addsearch -caption "Hotfix5" $test3 = webclass -table $UsersAcc -id IronMan -backgroundcolor red -textcolor green -Addsort -Addsearch -caption "Users" $test4 = webclass -table $Services -id WonderWoman -textcolor purple -Addsort -caption "Services" $test5 = webclass -table $Schedule -id MrFreeze -textcolor red -Addsearch -caption "Software" <# Example of inline color sourcing $test5.html = $test5.html|ForEach-Object{ if($_ -match "disabled"){$_ -replace "<tr>",'<tr style="color:red;">'} else{$_} } #> $e = [pscustomobject][ordered]@{ head = $html one = $page1 two = $test1 three= $test2, $test3 four = $test4, $test5 } $a = Write-WebPage -CustomObj $e $a|out-file C:\YourPage.html |