Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Info about Out-File

$
0
0

Hi!

recently, with the help of some guys in this forum, I managed towrite myfirst script.

Now i want to improve this code :

ConvertTo-HTML -head $head  -PostContent "<br><i>$(Get-date)</i>" -body $body | 
Out-File "C:\Test\Double.html" -Encoding ascii

Launching the script Double.html is overwritten.

How can I set the name in Double-DayMonth.hmtl (ex Double 22Nov.html)?

I know i must use get-date but How can I assign values?

Thanks

A


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>