Created
November 17, 2016 00:55
-
-
Save PythonCoderAS/fa3f48673dc0baf90b18e6c6ec1e1c9c to your computer and use it in GitHub Desktop.
Services In HTML
This file contains hidden or 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
| $a = "<style>" | |
| $a = $a + "BODY{background-color:peachpuff;}" | |
| $a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}" | |
| $a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}" | |
| $a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:PaleGoldenrod}" | |
| $a = $a + "strong{color: green;}" | |
| $a = $a + "</style>" | |
| $b = "<H2>Service Information</H2>" | |
| $b = $b + "<p> This is the list of services that are on this system. It dispays <strong>both</strong> running and stopped services </p>" | |
| Get-Service | Select-Object Status, Name, DisplayName | | |
| ConvertTo-HTML -head $a -body $b | | |
| Out-File C:\Scripts\Test.htm | |
| start "C:\Users\neela\Desktop\Services In HTML.ps1" | |
| Invoke-Expression C:\Scripts\Test.htm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment