Tag Archives: Settings

Virtual Center Server Settings revealed by Powershell

I’ve got a powerfull snippet of code for you today! Sure, we’ve already had lot’s of fun using the VI Toolkit to find and manipulate all sort of settings. But do you know where to find the Virtual Center Server settings, which you access in the VI Client through the menu Administration -> VirtualCenter Management Server Configuration? You soon will!
Here’s an example that grabs the License Server setting for you:

$svcRef = new-object VMware.Vim.ManagedObjectReference
$svcRef.Type = “ServiceInstance”
$svcRef.Value = “ServiceInstance”
$serviceInstance = get-view $svcRef
$licRef = $serviceInstance.Content.LicenseManager
$LicMan = Get-View $licRef
$LicMan.Source.LicenseServer

Explore the $serviceInstance.Content property to get an idea for the other things you can access using this “trick”:

RootFolder
PropertyCollector
ViewManager
About
Setting
UserDirectory
SessionManager
AuthorizationManager
PerfManager
ScheduledTaskManager
AlarmManager
EventManager
TaskManager
ExtensionManager
CustomizationSpecManager
CustomFieldsManager
AccountManager
DiagnosticManager
LicenseManager
SearchIndex
FileManager
VirtualDiskManager
VirtualizationManager

Imagine all the possibilities! You can expect more useful scripts from me in the days to come, so stay tuned!

»crosslinked«