I have started from scratch to be able to learn how to monitor our server (only one).
$dates=(get-date).ToString("s").Replace(":","-")
$page="page"+$dates+".csv"
get-wmiobject win32_pagefileusage | export-csv -path c:\tio\$page
$hyperpage="hyperpage"+$dates+".csv"
get-wmiobject win32_pagefileusage -computer Hyper | export-csv -path c:\tio\$hyperpage
$hyper="hyper"+$dates+".csv"
get-wmiobject win32_logicaldisk -computer Hyper | select-object -property DeviceID, FreeSpace, Size | Export-csv -path c:\tio\$hyper
$image="image"+$dates+".csv"
get-wmiobject win32_logicaldisk | select-object -property DeviceID, FreeSpace, Size | Export-csv -path c:\tio\$image
My aim is to find out how the free space on the hyper-v and the virtual host is growing.
Is it possible to merge them together as at this point it goes into 4 files. I would like to keep it low performance but merge as much as possible. Therefore the best thing would be an append function but don't want to upload the whole file in the memory every time unless I have to.
Many thanks in advance