Hi,
i'm trying to script with powercli but i'm not very good
My aim is to list for all my esx servers the location of scratch and to link this information with the
datastore name if possible. I want an html file with the informations:
Get-VMHost -Name * | Get-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation"
Get-VMHost -Name * | Get-VMHostAdvancedConfiguration -Name "ScratchConfig.CurrentScratchLocation" |
ConvertTo-HTML | Out-File C:\myfile.html
I fail to script it.
If someone can help me....
Thanks
Try something like this
$scratch="ScratchConfig.ConfiguredScratchLocation"
&{foreach($esx in Get-VMHost){
Get-AdvancedSetting -Entity $esx -Name $scratch |
Select @{N="ESXi";E={$esx.Name}},Value
}} | ConvertTo-Html | Out-File C:\report.html
Invoke-Item c:\report.html
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try something like this
$scratch="ScratchConfig.ConfiguredScratchLocation"
&{foreach($esx in Get-VMHost){
Get-AdvancedSetting -Entity $esx -Name $scratch |
Select @{N="ESXi";E={$esx.Name}},Value
}} | ConvertTo-Html | Out-File C:\report.html
Invoke-Item c:\report.html
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That's what i need
Thank you !
Would you be able to assist in the script to purge all the data from all of the the scratch disks? It not all, what about a particular file say called removeme.txt from all folders/subfolder located in the scratch partitions?