Created
October 2, 2019 17:16
-
-
Save adamdriscoll/c70da47f6f0c9636135529190718ce8f to your computer and use it in GitHub Desktop.
Combining Multiple PSHtml Elements into a Single String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Html = (& { | |
h1 "This is h1 Title in header" | |
div { | |
p { | |
"This is simply a paragraph in a div." | |
} | |
h1 "This is h1" | |
h2 "This is h2" | |
h3 "This is h3" | |
h4 "This is h4" | |
h5 "This is h5" | |
h6 "This is h6" | |
strong "plop";"Woop" | |
} | |
h1 "My favorites Fruits" | |
$Fruits = "Apple","Banana","Orange","Ananas" | |
ul { | |
foreach($fruit in $Fruits){ | |
li { | |
$fruit | |
} | |
} | |
} | |
}) -join '' | |
New-UDHtml -Markup $Html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment