Key,Value
isolation.tools.copy.disable,true
isolation.tools.dnd.disable,true
isolation.tools.paste.disable,true
isolation.tools.diskShrink.disable,true
isolation.tools.diskWiper.disable,true
vmci0.unrestricted,false
logging,false
isolation.tools.ghi.autologon.disable,true
isolation.bios.bbs.disable,true
isolation.tools.getCreds.disable,true
isolation.tools.ghi.launchmenu.change,true
isolation.tools.memSchedFakeSampleStats.disable,true
isolation.tools.ghi.protocolhandler.info.disable,true
isolation.ghi.host.shellAction.disable,true
isolation.tools.dispTopoRequest.disable,true
isolation.tools.trashFolderState.disable,true
isolation.tools.ghi.trayicon.disable,true
isolation.tools.unity.disable,true
isolation.tools.unityInterlockOperation.disable,true
isolation.tools.unity.taskbar.disable,true
isolation.tools.unityActive.disable,true
isolation.tools.unity.windowContents.disable,true
isolation.tools.unity.push.update.disable,true
isolation.tools.vmxDnDVersionGet.disable,true
isolation.tools.guestDnDVersionSet.disable,true
isolation.tools.vixMessage.disable,true
floppyX.present,false
parallelX.present,false
serialX.present,false
tools.setInfo.sizeLimit,1048576
RemoteDisplay.vnc.enabled,false
isolation.device.connectable.disable,true
RemoteDisplay.maxConnections,1
isolation.device.edit.disable,true
tools.guestlib.enableHostInfo,FALSE
vmsafe.enable,false
isolation.tools.copy.disable,true
isolation.tools.hgfsServerSet.disable,true
isolation.tools.connectable.disable,true
isolation.tools.setGUIOptions.Enable,false
log.keepOld,10
log.rotateSize,100000
####################################
# VMware VirtualCenter server name #
####################################
$vCenter = @(
"server1",
"server2",
"server3",
"server4"
);
##################
# Add VI-toolkit #
##################
Add-PSsnapin VMware.VimAutomation.Core
Initialize-VIToolkitEnvironment.ps1
Connect-VIServer -Server $vCenter
$import = Import-Csv "C:\Scripts\VMachine_config.csv"
$vms = Get-View -ViewType VirtualMachine | where {-not $_.config.template}
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
foreach($item in $import){
$extra = New-Object VMware.Vim.optionvalue
$extra.Key=$item.Key
$extra.Value=$item.Value
$vmConfigSpec.extraconfig += $extra
}
foreach($vm in $vms){
$vm.ReconfigVM($vmConfigSpec)
}
Disconnect-VIServer –Confirm:$false
####################################
# VMware VirtualCenter server name #
####################################
$vCenter = @(
"server1",
"server2"
);
##################
# Add VI-toolkit #
##################
Add-PSsnapin VMware.VimAutomation.Core
Initialize-VIToolkitEnvironment.ps1
Connect-VIServer -Server $vCenter
$snap=get-snapshot -vm * ; remove-snapshot -snap $snap
Disconnect-VIServer –Confirm:$false
####################################
# VMware VirtualCenter server name #
####################################
$vCenter = @(
"server1",
"server2"
);
##################
# Add VI-toolkit #
##################
Add-PSsnapin VMware.VimAutomation.Core
Initialize-VIToolkitEnvironment.ps1
Connect-VIServer -Server $vCenter
get-cddrive -VM *|where {$_ISOPATH -ne $null}|set-cddrive -nomedia
Disconnect-VIServer –Confirm:$false
even if each is in its own one liner