VMware Cloud Community
eaphilipp
Contributor
Contributor

Email Text and Variable in Body

Hello,

We are in a the middle of a VCF migration and I am trying to send a daily email with daily VMcount

-Subject 'VCF4 VM Count' -Body ('Todays VCF4 VMCount is' $vmcount | Out-String)

How do I add some text to the body before my populated $VMcount variable? 

Thanks for the help!

-eric

0 Kudos
1 Reply
LucD
Leadership
Leadership

Just extend the string you are passing on the Body parameter.
You can have multiple lines by adding a <NL> (`n)

 -Body ("Fist line`nTodays VCF4 VMCount is $vmcount" | Out-String)

  


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos