PeetersOnline.nl
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





Keep Your Server Descriptions Synchronized
Today’s “Helpful Function of the Day” is my attempt to help you keep your server descriptions in sync.
You use it by placing it in your profile, or by dot-sourcing the script, or by adding the function to one of your own scripts. The syntax is:
If you would like to check or update the description of one server, first connect to Virtual Center (Connect-VIServer), then run: Check-Description SERVERNAME. The script will return the description from the VI Client (if the server is a vm), from Active Directory (if it is found in AD) and from the registry of the server itself (the so-called Browse Comment). It then displays a menu which allows you to select one description as the correct description. It will then update the other descriptions (unless they are unavailable).
In case you would like to check a big list of servers to see if the descriptions are in sync, you use the command as follows:
This command will process all found servers. You can also process a list of servers from a textfile like so:
The SkipIdentical switch will cause the script to output the servername and description if the descriptions are all in sync. This will speed up using the script, because it will not ask for your input for each and every server, only for those where the descriptions are not identical.
Check-Description (Rename to .ps1)
Questions and remarks are welcome in the comments!
Enjoy!
No related posts.