Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Clickable PowerShell script on an HTML page

$
0
0

Hi

I have the following script 

......

$body+='<br />'

$body+='<br />'

$body+='<button onlick="myFunction($script)">Rackhat</button>'

$script = Get-WinEvent -Computer RackHat -Credential $creds -FilterHashtable @{LogName="Application"; ProviderName="ESENT"} | Select TimeCreated,Level,MachineName,ID,ProviderName,Message | ConvertTo-Html -Fragment

ConvertTo-HTML -body $body -head $head -As Table | Out-File  "C:\Rackhat.html" 

I want to be able to click on the button and have the script run in the background and once completed, open a new webpage with the results. Is this possible?

Thanks



Viewing all articles
Browse latest Browse all 15028

Trending Articles