Quantcast
Viewing all articles
Browse latest Browse all 49146

Re: Ask for help

PowerShell has a builtin option to save to a CSV file.
Like this

 

Get-VM|

Select Name,NumCPu,MemoryGB,UsedSpaceGB,

   @{N='GuestOS';E={$_.Guest.OSFullName}}|

Export-Csv-Path .\report.csv -NoTypeInformation -UseCulture

 

If you want to save the result to a .xlsx file, you will need to install the ImportExcel module.
you can do that with the Install-Module cmdlet.

 

Install-Module-Name ImportExcel

 

Then the earlier script becomes

 

Get-VM|

  Select Name, NumCPu, MemoryGB, UsedSpaceGB,

@{N='GuestOS';E={$_.Guest.OSFullName}}|

Export-Excel-Path .\report.xlsx


Viewing all articles
Browse latest Browse all 49146

Trending Articles



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