Displaying Get-ACL from user input

Hey @gerard off work today so trying not to be a keyboard warrior, but I cannot help not being on my computer…anyways just want to say thanks to @BritV8 for your input, some good advice shared there…so without trying your whole script, I had a similar problem, I got asked by a manager to record people visiting the SALES dashboard I created, I had the exact same problem, that the multiple text line file I was storing the visitors in would always display as one huge line, which made it very difficult to read. So to get each line of the text file output into it’s own line I did this:-

New-UDColumn -Size 12 -Endpoint  {
    New-UDHeading -Text "Welcome $user"
    "$User logged in at $(get-date)" | Out-File "$Root\Visitors.txt" -Append

}

New-UDRow -Columns {
New-UDColumn -size 12 -Endpoint {
$info = get-content “$Root\Visitors.txt”
$result = Foreach ($line in $info){
New-UDHtml -Markup (“< b>$line< /b > < br >”)
New-UDHtml -Markup (“< br >”)
}
New-UDLink -Text “Visitors” -OnClick {
Show-UDModal -Content {
New-UDHeading -Text “Visitors To This Dashboard” -Size 4
$result
}
}
} -AutoRefresh -RefreshInterval 5
}

I hope this provides some assistance I know other members like @BoSen29 has provided a multi-line answer here:- New Lines in New-UDButton (`n)
I ended up using the example @leeberg posted here:- How do I display output in Format-List style? - #7 by MadWithPowerShell

to get my solution working…let me know if you need more assistance, but hopefully this will give you an answer. Peace

P.S only just seen the BR tags were not displaying so had to add an extra space to get them to show but use that without the spaces

1 Like