cparker4486 wrote:edit: Let me clarify that question. Do you know why cmdlets don't expose every key as a parameter for the command?
I think it's fair to say that no (or at least very few) cmdlets expose every possible property of an object as a command line option. There are some that are pretty much considered "standard" such as "Name", and others which are more left up to discretion based on use case. This isn't unique to Veeam Powershell as more as a base concept of powershell and part of it's power.
For example, take the "Get-VM" parameter from the vSphere PowerCLI powershell interface, it provides command line parameters to filter on things like Datastore, Location, Name, Id, and I think a couple of others, but what if you want to query only VMs that are currently powered on? There's no command line parameter for that, you simply fall back to leveraging the object model for the VM, something like:
Code: Select all
Get-VM | where { $_.PowerState -eq “PoweredOn”}
So this would return only VMs that are powered on. Simple enough, and easy enough to mimic with a simple command line option. But what happens when you want to get more complex, like returning all VMs that are powered on with more than 4GB of RAM and less than 2 vCPUs? With the syntax above is easy for me to construct such complex queries to get only the results I want leveraging the object model and the full range of conditional logic available to me in Powershell. This level of selection logic would be extremely difficult to mimic using only command line options and would get ugly very quickly.