Home > Blogs > VMware PowerCLI Blog


Guest Post: Finding your way in the PowerCLI Community

Luc
Posted by
Luc Dekens
PowerCLI Community Member

Introduction

The VMTN PowerCLI Community is a vast repository of PowerCLI scripts and snippets. At the time of writing this post, there were nearly 5000 threads and more than 80 documents posted.

With so many threads present, it happens quite often that users ask a question that was already answered in a different thread. The problem is that most users of the PowerCLI Community don’t really know how to search the threads and documents. Admittedly, the search functionality offered in the VMTN communities is not the easiest and most intuitive one to use. Hence this post that should give you a couple of pointers on how to use the PowerCLI Community as (very) big repository of PowerCLI goodies.

Starting a search

On any page of the community you will see a search box near the top right corner of your browser page.

image

Let’s type some text, for example ‘svmotion’ in the search field. The forum software will now automatically open a drop-down box with some first results.

image

You have 3 options to continue.

1. By clicking the magnifying glass or the ‘View All Results’ text, the Search page will open. From there you can select one of the displayed threads or documents, or you can further refine your search.

2. The results that are displayed in the drop-down box do not come from the PowerCLI Community alone. They are entries found throughout all the Communities in the VMTN forum. By clicking on the ‘Only for VMware vSphere ™ PowerCLI’ hyperlink at the top of the drop-down box, the contents of the drop-down box will change. It will contain only entries coming from the PowerCLI Community.

image

If you now click on the ‘View All Results’ hyperlink, you will be taken to the Search page, similar to the first option. But the Search page will only contain entries from the PowerCLI Community.

Note that clicking the magnifying glass you will be taken to the Search page, but the results will come from all VMTN communities!

You can go back to the results from all the VMTN communities by clicking the ‘All’ hyperlink at the top of the drop-down box.

3. If you see in the list a post whose title suggests that it might contain what you are looking for, you can click on that line. The selected thread will open.

The Search page

This is the page where you have a plethora of options at your disposal to refine your search.

image

1.  Add words to refine your selection criteria.

On the ‘Search Tips’ you can find many ways to fine-tune your search. A short extract of the more important search rules:

  • When you enter multiple words, the search will look for threads and documents that contain all of the words.
  • When 1 or both of the words should appear in the thread or document, use OR between the words. For example: ‘svmotion OR vmotion
  • Put the logical operators in Caps to distinguish them from your search keywords.
  • When looking for an exact sequence of words, place them in double quotes. For example: ‘”background job”
  • Use the fuzzy search (~) when you are not 100% sure of the word(s) you’re looking for. For example: ‘motion~’’
  • Use a weight (^n) on specific words to make them more important in your search. For example: ‘svmotion^2 vmx’. This will make the presence of ‘svmotion’ twice as important as the presence of ‘vmx’.
  • Indicate in which part of the post (subject, body, tags or attachmentsText) you want to search for a word. For example: ‘subject:svmotion
  • Specify words that should not be in the results. For example: ‘svmotion NOT vmx
  • Use parenthesis to create complex search strings. For example: ‘svmotion AND (vmdk OR vmx)

2.  Under ‘More options’ you can limit your search to a specific Community or a specific person. When you want to select a specific Community, type part of the Community name and select one of the Communities that is proposed.

image

Note that you will have to start with ‘vsphere’ to get to the PowerCLI Community !

image

The search will now be limited to the PowerCLI Community.

3. When the search returns a number of hits, you can order the results by Date, Subject or Relevance.

image

The options Subject and Date are self-explanatory. The Relevance option is a percentage given by the Jive search algorithm to the search results, indicating how much a specific search result corresponds with the search query.

The best results, according to the search algorithm, will appear at the top of the list.

4. With the ‘What’ options you can filter the results based on where they are found. In the PowerCLI Community the only usable options are All, Discussions or Documents. The Blog Posts and Links do not seem to be used in the PowerCLI Community.

The options correspond with the Tabs you see on the PowerCLI Community page.

image

5. The ‘When’ option allows you to specify in which period in the time you want to search. You can select Anytime, the past Day, Week, Month or Year.

Since the oldest threads in the PowerCLI Community date from December 2007, this can be a handy option to limit the search results to those that correspond with the actual PowerCLI version.

Remember that there are on average 2 new PowerCLI versions per year, and that each of these brings a bunch of new Cmdlets and sometimes even complete snapins. So a valid answer from 2008 is not necessarily the best answer for the latest PowerCLI version !

Some practical examples

With the knowledge from the previous section, you should now be able to perform very precise searches and get useful results. Since I’m a strong believer in the “learn by example” principle, I added a couple of practical examples in this section that will hopefully help you getting started.

Know the defaults of the Search

Remember that the Search engine by default will use AND if you enter multiple keywords.

Use OR when you want results that contain one or the other of the keywords to be present in the results.

Instead of doing ‘vmx tools copy paste’ use ‘vmx AND tools OR copy OR paste’.

Don’t use only general keywords

Try to avoid using general search terms that will produce hundreds of results.

Don’t search for ‘PowerCLI vm report’, instead use one or more specific keywords ‘vm report numcpu’. In this example the addition of the numcpu keyword will get you more specific results.

Try to use very specific keywords

This is perhaps a stupid advice, but one that could save you a lot of time.

Suppose you are looking for a thread that discusses deploying a VM from a template and that includes information on customizing the NIC of the guest.

Your first thought could be to type ‘deploy vm template nic customise’, this returned 27 threads.

If you know that you can use the Set-OSCustomizationNicMapping cmdlet for this, add the cmdlet in the keywords. That returned only 1 thread.

Use the VMware vSphere PowerCLI Overview

In the previous example the addition of the Set-OSCustomizationNicMapping keyword to the search, gave us a better search result. But how do you know that cmdlet exists if you are new to PowerCLI or had never used the cmdlet before.

In the VMware vSphere PowerCLI Overview you can use the search functionality to help you discover the Cmdlets. In this example when you for example type the word ‘nic’, the reference will return a number Cmdlets, including the Set-OSCustomizationNicMapping cmdlet.

image

Note that you also search for Types, Parameters and Enumerations.

Use the More and Filter Options

Do not only use keywords. Sometimes it is useful to add 1 of the More options to fine-tune your search.

For example, searching for ‘vcheck’ (the famous reporting script) will return 34 results. By adding the name of the user who posted or replied, you can limit the number of results. The same query, but with the addition of the Restrict to a specific person option, will return only 3 results.

image

If you want to find results that are more likely to discuss the most recent version of the vCheck script, use the When option.

image

This produced 3 results that all referenced vCheck v6.

Let Bookmarks help you

I don’t know if this already happened to you, but I often find a useful or interesting thread that I can’t find back after a couple of days. To avoid this use the Bookmark feature to add such a thread to your list of threads that you want to keep for later consultation.

You can find the Bookmark option on the right side under the Actions,

image

click it and optionally enter some notes to go with the bookmark. Note that you make your bookmarks public or private.

image

You can consult your Bookmarks through the My Bookmarks entry in your user accounts drop-down menu.

image

This entry was posted in Uncategorized on by .
Alan Renouf

About Alan Renouf

Alan Renouf is a Product Line Manager at VMware focusing on API’s, SDK’s and CLI’s, He is responsible for providing the architects and operators of private and public cloud infrastructure with the toolkits/frameworks and command-line interfaces they require to build a fully automated software-defined datacenter.

Alan is a frequent blogger at http://blogs.vmware.com/PowerCLI a book author and has a personal blog at http://virtu-al.net.

You can follow Alan on twitter as @alanrenouf.

3 thoughts on “Guest Post: Finding your way in the PowerCLI Community

  1. website

    Wrijte more, thats all I have to say. Literally,it seems as though you
    relied onn the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting
    videos to your site wheen you could be giving us something iinformative to read?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*