I need to see which vm advanced settings exist on a set of vms. I have a file with a list of advanced settings in csv format as below. How can I list these settings out for a vm? by default I think most of these don't exist on VMs until added, but I want to take this list and list any which do exist on a list of vms.
for example
$vm = Get-VM myvm | get-advancedsetting (get all advanced settings on the list)
ConfigurationParameter,
isolation.tools.autoInstall.disable,
isolation.tools.copy.disable,
isolation.tools.dnd.disable,
isolation.tools.setGUIOptions.enable,
isolation.tools.paste.disable,
isolation.tools.diskShrink.disable,
isolation.tools.diskWiper.disable ,
isolation.tools.hgfsServerSet.disable,
scsiX:Y.mode,
vmci0.unrestricted,
logging,
isolation.monitor.control.disable,
isolation.tools.ghi.autologon.disable,
isolation.bios.bbs.disable,
isolation.tools.getCreds.disable,
isolation.tools.ghi.launchmenu.change,
isolation.tools.memSchedFakeSampleStats.disable,
isolation.tools.ghi.protocolhandler.info.disable,
isolation.ghi.host.shellAction.disable,
isolation.tools.dispTopoRequest.disable,
isolation.tools.trashFolderState.disable,
isolation.tools.ghi.trayicon.disable,
isolation.tools.unity.disable,
isolation.tools.unityInterlockOperation.disable,
isolation.tools.unity.taskbar.disable,
isolation.tools.unityActive.disable,
isolation.tools.unity.windowContents.disable,
isolation.tools.unity.push.update.disable,
isolation.tools.vmxDnDVersionGet.disable,
isolation.tools.guestDnDVersionSet.disable,
isolation.tools.vixMessage.disable,
floppyX.present,
ideX:Y.present,
parallelX.present,
serialX.present,
usb.present,
RemoteDisplay.maxConnections,
RemoteDisplay.maxConnections,
log.keepOld,
log.rotateSize ,
tools.setInfo.sizeLimit,
isolation.device.connectable.disable,
isolation.device.edit.disable,
tools.guestlib.enableHostInfo,
ethernetn.filtern.name = filtername,
vmsafe.agentAddress,
vmsafe.agentPort,
vmsafe.enable,
RemoteDisplay.vnc.enabled,
$list = get-view -viewtype virtualmachine -property 'config.ExtraConfig', 'name' | select name, @{n='AdvOpt';e={$_.config.ExtraConfig}}
Then you will get a collection of object like
$list[0]
Name AdvOpt
---- ------
VM_NAME {nvram, virtualHW.productCompatibility, ....
$list[0].AdvOpt and you can see all those options for vm
you can just then search through the advopt 'key' property to see if something is inside or not
What kind of format are you looking to see? A per VM list of just which settings are present and its value, or a per VM list of all settings with either their current setting or an annotation of "Not set"/"Default"?
actually, now that you mention it, a per VM list of all settings with either their current setting or an annotation of "Not set"/"Default" would be great....
$list = get-view -viewtype virtualmachine -property 'config.ExtraConfig', 'name' | select name, @{n='AdvOpt';e={$_.config.ExtraConfig}}
Then you will get a collection of object like
$list[0]
Name AdvOpt
---- ------
VM_NAME {nvram, virtualHW.productCompatibility, ....
$list[0].AdvOpt and you can see all those options for vm
you can just then search through the advopt 'key' property to see if something is inside or not
ok thanks!