I am using follow
Get-VM | where{$_.Name -match "ENV"} |
ForEach-Object -Process {
New-AdvancedSetting -Entity $_ -Name isolation.tools.ghi.protocolhandler.info.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.guestDnDVersionSet.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.memSchedFakeSampleStats.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.device.connectable.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.unityInterlockOperation.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.hgfsServerSet.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.ghi.autologon.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.vmxDnDVersionGet.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.unity.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.diskShrink.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.unity.windowContents.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.unityActive.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.ghi.host.shellAction.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.ghi.launchmenu.change -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.diskWiper.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.unity.taskbar.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.unity.push.update.disable -Value 'TRUE' -Confirm:$true -Force
New-AdvancedSetting -Entity $_ -Name isolation.tools.ghi.trayicon.disable -Value 'TRUE' -Confirm:$true -Force
}
but for each vm as question :
Perform operation?
Creating advanced setting 'isolation.tools.ghi.protocolhandler.info.disable' on entity 'Env-A'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
how can set Y option in the command that apply for all vms and questions