Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 229602

Re: Getting information about Guest in table

$
0
0

LucD escreveu:

 

Try this

Get-VM | Select Name,VMHost,NumCPU,PowerState,MemoryMB,@{N="Datastore"; E={$_ | Get-Datastore}} | ConvertTo-HTML | Out-File report.html

 

You can of course produce much elaborate HTML output by using parameters on the ConvertTo-Html cmdlet, and by using style sheets (CSS).

See for example Using the ConvertTo-Html Cmdlet

Hi LucD

 

Tks! For your help!!

 

I try this in my profile

 

#### config  HTML ###############################

$aforma = "<style>"

$aforma = $aforma + "BODY{background-color:peachpuff;}"

$aforma = $aforma + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"

$aforma = $aforma + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}"

$aforma = $aforma + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:PaleGoldenrod}"

$aforma = $aforma + "</style>"

##### End config ##################################

 

And script line:

Get-VM | Select Name,VMHost,NumCPU,PowerState,MemoryMB,@{N="Datastore"; E={$_| sort-object -property Name | Get-Datastore}} | ConvertTo-HTML -head $aforma| Out-File report_$DATTA.html

 

Its a simple script but....

 

Sorry my bad english im brazilian!!


Viewing all articles
Browse latest Browse all 229602

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>