-1

I'm trying to use the VMWare PowerCLI v6.0 to do some automated things. I have found the installed and online version of the cmdlet documentation and for the most part it tells you very simple information about the commands, like the parameters, return types and what the cmdlet does.

I'm trying to find more complete documentation on this because the online documentation provided by VMWare doesn't list the exceptions that a particular cmdlet might throw and definitely doesn't properly describe the types and their properties. For example:

$org = Get-Org -Name "test"
$leases = $org.ExtensionData.Settings.GetVAppLeaseSettings()
$leases.DeploymentLeaseSeconds = 0
$leases.StorageLeaseSeconds = 0
$leases.DeleteOnStorageLeaseExpiration = $False
$leases.UpdateServerData()

The example code can be found all over the internet but there's no details on it at all, just a vague "This is how you X". I've searched and searched but I can't find any documentation on what type ExtensionData returns and absolutely no documentation on the method GetVAppLeaseSettings. It seems like as far as VMWare and their documentation is concerned, this function doesn't exist.

Does anyone know where I can find documentation that lists thrown exceptions for each cmdlet and what CLR types are returned in the ExtensionData properties?

UPDATE

I watched a Pluralsight video on PowerCLI and found that you can display the ExtensionData object type and properties by simply running

$obj.ExtensionData

You can also see all the methods available for that object by running

$obj.ExtensionData | Get-Member -MemberType method

The problem with this is that you need to be connected to an existing vCloud server and even though this lists the available properties and methods, it does not show any documentation for those properties or methods. Not to mention you would need to actually have an object created to be able to query these values, for example:

$org = Get-Org -Name "test"
$org.ExtensionData | Get-Member -MemberType method

In the above example, I need to be connected to the server and already have an organization created to be able to view its properties and methods.

I'm looking for the documentation on those properties and methods and it doesn't seem like that exists anywhere that I've searched.

EDIT

If you are down voting or voting to close, please provide me with feedback. This is a serious question and I have done a lot research into answering this myself before I posted it here.

vane
  • 2,125
  • 1
  • 21
  • 40
  • 1
    If you find that the official documentation is lacking (I can't really argue with that), your best friends are `GetType()`, `Get-Member` and ILSpy – Mathias R. Jessen Dec 30 '15 at 10:05
  • @MathiasR.Jessen I understand that and that is what I've been using. That's why I'm asking this question, I wanted to know if there's anything I'm missing, if there's some documentation out there that I haven't found. I'm also doing this in an environment where it's very difficult to be connected all the time so using `GetType()` and `Get-Member` isn't always viable – vane Dec 30 '15 at 10:06
  • 1
    In that case, inspecting the PowerCLI SDK dll's in ILSpy will definitely be helpful (if you haven't already). Although it won't give you a complete list of exceptions, it'll at least give you an idea of what to expect – Mathias R. Jessen Dec 30 '15 at 10:10
  • @MathiasR.Jessen I have and that's what I was afraid of, especially with the problem of what type `ExtensionData` actually is because in `ILSpy` the returned types are mostly interfaces and no actual implementation unless I spend a lot of time hunting down what class is actually instantiated and assigned to `ExtensionData`. Looks like I'm stuck with 0 documentation on this. Thanks. – vane Dec 30 '15 at 10:13
  • Voting to close, because you're asking us to recommend off-site documentation, which is clearly off-topic. – Ansgar Wiechers Dec 30 '15 at 14:14
  • @AnsgarWiechers Requesting official off-site documentation is against the rules but offering official off-site documentation in an answer is not? – vane Dec 30 '15 at 18:11
  • @AnsgarWiechers i see in the rules where it says what you're saying but it also says "Instead, describe the problem and what has been done so far to solve it." which I feel that I have done. I've stated the problem which is "I can't find the official documentation anywhere" and have said what I've done to solve it. I'm not asking for an opinion on what's best or what would you recommend, I'm asking if there is an existence of official documentation and if so, where it's located. Seems pretty cut and dry with no room for subjectivity. – vane Dec 30 '15 at 18:19

1 Answers1

0

With the help of Mathias in the comments, I've determined that there is no official documentation for this portion of the PowerCLI. The only way to get any kind of documentation is to use a tool like ILSpy or through the PowerCLI terminal itself by means of commands like GetType() and Get-Member

vane
  • 2,125
  • 1
  • 21
  • 40