Last active
May 16, 2018 10:47
-
-
Save brettmillerb/b924660403d521776598b15f47580d7c to your computer and use it in GitHub Desktop.
Create Simple HTML Table
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
$content = Get-ADGroupMember -Identity 'domain admins' | select name, samaccountname | ConvertTo-Html -Fragment | |
@" | |
<html> | |
<head> | |
<title>test</title> | |
<style type='text/css'> | |
table, th, td { | |
border: 1px solid black; | |
border-collapse: collapse; | |
text-align: center; | |
padding: 5px; | |
} | |
tr:nth-child(even) { | |
background: #D3D3D3; | |
} | |
tr:nth-child(odd) { | |
background: white; | |
} | |
</style> | |
</head> | |
<body> | |
$content | |
</body> | |
</html> | |
"@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment