Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to save *.html files?

$
0
0

$WebFilePath = "$HOME\ABC\Test.html"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<Head>
    <style>BODY background-color:peachpuff;</style>
</HEAD>
<BODY>
<H1>PowerShell Scripted Web Page</H1>
</BODY>
</HTML>
Invoke-Expression $WebFilePath

 

-------------------------------------------------

I want to save this script as a html file that I can see with a web-browser.

 

But, I'm facing many errors. I searched for these errors on the Internet.

 

Where did I go wrong?


Viewing all articles
Browse latest Browse all 6937

Trending Articles