anyone have the script for this add this to all the vm logrotate Size ="10240000" add another line rotate =3 please let me know thanks
Something like this when there already is a value for existing parameter.
Connect-VIServer -Server "myvcsaoresxi" -User "administrator@vsphere.local" -Password "topsecret"
$vms = Get-VM
foreach($vm in $vms) {
Get-VM -Name $vm.Name | Get-AdvancedSetting -Name "config parameter name" | Set-AdvancedSetting -value "value" -Confirm:$false
}
You need to install VMware vSphere PowerCLI on your favorite Windows VM/PC. Yes.... there is also Powershell for Linux but on Windows its paste&run.
Regards,
Joerg
To a bunch of VMX files? Where do you want the script to run from?
here is an example with powercli : PowerCLI: Configure Log rotation and size options for vmware.log – Deans Blog
run from vCenter?
Something like this when there already is a value for existing parameter.
Connect-VIServer -Server "myvcsaoresxi" -User "administrator@vsphere.local" -Password "topsecret"
$vms = Get-VM
foreach($vm in $vms) {
Get-VM -Name $vm.Name | Get-AdvancedSetting -Name "config parameter name" | Set-AdvancedSetting -value "value" -Confirm:$false
}
You need to install VMware vSphere PowerCLI on your favorite Windows VM/PC. Yes.... there is also Powershell for Linux but on Windows its paste&run.
Regards,
Joerg
Moderator: Thread moved to the PowerCLI area.