Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Monday, January 19, 2009

when XML denies CSV and HTM

to get the ServiceController objects for all of the services that are running in their own processes, then export this information to a CSV file

PS R:\> get-service
| where { $_.serviceType -eq "Win32OwnProcess" }
| export-csv -notype ./edit3.csv

or,

PS R:> get-service | where { $_.serviceType -eq "Win32OwnProcess" } | export-csv -notype ./edit3.csv


or,

PS R:\> get-service
| where { $_.serviceType -eq "Win32OwnProcess" }
| export-csv -notype ./edit3.htm <--- not applicable for .xml


` edit3.csv ` contains delimited (comma-separted) text.

list out all services and store them into a web page

step 1) to list and store
PS R:\> get-service | convertto-html > .\a10.html

step 2) to run a web page
PS R:\> .\a10.html

`a10.html` will show a detailed information such as ( Name, CanPauseAndContinue, CanShutdown, CanStop, DisplayName, DependentServices, MachineName, ServiceName, ServicesDependentOn, ServiceHandle, Status, ServiceType, Site Container )

get OSVersion information in html format

PS> [environment]::OSversion
| convertto-html
| out-file 'r:\test1.html'

To view with web browser,

./test1.html