powershell - Create multiple Html tables for the results of commandlets for ConvertTo-Html? -


i have following scripts. wish returns 2 html tables, however, both of them return big html table. way create multiple tables using convertto-html?

@(dir | select -first 3; get-process | select -first 3) | convertto-html  @{dir = dir | select -first 3; ps = get-process | select -first 3} |      convertto-html 

not elegant, works:

get-process | select -first 3 | convertto-html -body (dir | select -first 3 | convertto-html -fragment) |out-file result.html 

good luck!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -