Others may have others ideas, but you are in a place others hit often. You need the run-time results of one command to be useable in another subsequent comamnd of the workflow. People's first thought is getting the result into an MVEL namespace variable so you can then pass it to the subsequent command step. However, that is not possible (a longer story).
WFA does have the ability for one command to create and set a workflow-global variable and a subsequent workflow command step can get to that variable ... using (check Developer Guide and check exact spelling of cmdlets):
Set-WfaWorkflowParameter
Get-WfaWorkflowParameter
So something like:
- modify your 1st command to load it's result into a workflow parameter using Set-WfaWorkflowParameter, say: myQtreeName
- modify your 2nd command to get that value using Get-WfaWorkflowParameter to get myQtreeName
This probably means you can't use the built-in certified commands to cretae a qtree, share, etc (anything that needs to access myQtreeName). You will need to clone them and then modify them to use Get-WfaWorkflowParameter rather than a passed input parameter.