When trying to set XCOPY to 16MB I get an error. I have tried quotes and no quotes and all other Advanced Settings seem to work fine. Also I noticed that this cmdlet is considered onsolete and the Set-AdvancedSetting cmdlet took it's place, but can't get it to work either.
Command:
Set-VMHostAdvancedConfiguration -VMHost host01 -Name DataMover.MaxHWTransferSize -Value "16384"
Error:
Set-VMHostAdvancedConfiguration : 11/16/2017 1:12:50 PM Set-VMHostAdvancedConfiguration A specified parameter was not correct:
At line:1 char:1
+ Set-VMHostAdvancedConfiguration -VMHost host01 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostAdvancedConfiguration], InvalidArgument
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_GetVmHostAdvancedConfiguration_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostAdvancedConfiguration
This seems to work for me
Get-AdvancedSetting -Entity host01 -Name DataMover.MaxHWTransferSize |
Set-AdvancedSetting -Value 16384 -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you try leaving out the quotes?
Now it is perhaps considered a string
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yep, the integer fails with the same error message as well. I even tried it with pipelines, but Set-VMHostAdvancedConfiguration does not take pipelines apparently. I could always try with the non-obsolete cmdlet I guess but didn't iron out that syntax.
This seems to work for me
Get-AdvancedSetting -Entity host01 -Name DataMover.MaxHWTransferSize |
Set-AdvancedSetting -Value 16384 -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD, I'm going to go back and convert the others back to this cmdlet as well!