PowerShell Checks Script Output to HTML Issue -


i have checks script converting output html.

it has function checks websites response time. can't life of me output show in html. ideas?

# function check external website content function websitecheck($object) { $webclient = new-object system.net.webclient $webclient.headers.add("user-agent", "powershell script") $output = "" $starttime = get-date $output = $webclient.downloadstring($object) $endtime = get-date if ($output -like "*test*" -or "*testing*") {  "success`t`t" + $starttime.datetime + "`t`t" + ($endtime - $starttime).totalseconds + " seconds" + "`t" + $object }   else {    "fail`t`t" + $starttime.datetime + "`t`t" + ($endtime - $starttime).totalseconds + " seconds" + "`t" + $object  } }  #external website check function write-host "external website checks" write-host "" $html = $html + @" websitecheck "http://www.website01.com" websitecheck "http://www.website02.com" "@ write-host "=========================" write-host "" 

thanks

wrap expressions inside here-string execute prior being added stirng. ex.

$html = $html + @" $(websitecheck "http://www.website01.com") $(websitecheck "http://www.website02.com") "@ 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -