Product: PowerShell Universal
Version: 2
Here is the code so far:
$FMIT = $FMIT | select-object Displayname, Samaccountname, Company, @{l = "Manager"; e = { ($_.Manager -replace 'CN=', '').split(',')[0] } }
$Colums = @(
New-UDTableColumn -Property Image -Title "Image" -Render {
new-udhtml -markup "<img src='https://mysite.us/images/$($_.samaccountname).jpg' width='150' height='150'>"
}
new-udtablecolumn -property "Company" -title "Company" -Filter -FilterType AutoComplete
new-udtablecolumn -property "DisplayName" -title "Display Name" -Filter -FilterType AutoComplete
new-udtablecolumn -property "Samaccountname" -title "User name" -Filter -FilterType AutoComplete
new-udtablecolumn -property "Manager" -title "Manager" -Filter -FilterType AutoComplete
)
New-UDTable -Data $FMIT -Columns $Colums -sort -export
}
I am trying to get the first column to show the Image of each user based on the username. I know Iām going about this wrong, please let me know.
The link of the image is .jpg instead of a name.jpg.