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!
One Response to Virtual Center Server Settings revealed by Powershell
Tags
Active Directory API bind order cleanup cluster CPU Custom Fields datastores description device management directory tree errors Event Log file name filter Fun function HA IT known issues License Server LUN multipath NIC objects Oneliner portgroups PowerCLI PowerShell profile recursive Registry Scripts security session share snapshots SQL Stat VI Toolkit VMware vSphere WMI WSUS ZenArchives
- July 2012
- July 2011
- February 2011
- January 2011
- December 2010
- May 2010
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008





[...] Virtual Center Server Settings revealed by Powershell [...]