Open crossan007 opened 6 years ago
I also ran into the same issue.
What do you expect to be returned? PipeBindObjects are not objects that are supposed to be returned, they are only used internally for input parameters (their purpose is to allow people to use different types of values that point to a same object for a single parameter, e.g. strings and guids for an ID, or a contenttype object and contenttypeid for a content type).
Returning the actual DocumentSet object won't allow you to do much with, it has no properties as such other than a method which allows you to export is to a Stream.
in the same vein, New-PnPList used to return the list object. Now I have to make an extra call with Get-PnPList
@ricaea I checked the source code all the way back to august 2015, but New-PnPList never returned a list object.
I would like that the Add-PnPDocumentSet returns the ID of the new created DocumentSet in stead of the string (url) to the documentset.
I would like that the Add-PnPDocumentSet returns the ID of the new created DocumentSet in stead of the string (url) to the documentset.
Yess, that would be much helpful.
Reporting an Issue or Missing Feature
When creating various items using PnP, a PipelineBind object is often returned, which contains a reference to the newly created object (whether it be a GUID, or an ID, along with the parent container list / library). When creating a new Document Set, only a string of the newly created Document Set's location is returned.
The absence of a PipelineBind object makes it difficult to perform subsequent actions on the newly created Document Set (such as setting properties on the document set).
Expected behavior
The return of Add-PnPDocumentSet should return a PipelineBind object containing a pointer to the new Document Set
Actual behavior
A string is returned
Steps to reproduce behavior
Execute Add-PnPDocumentSet
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
2.21.17
How did you install the PnP-PowerShell Cmdlets?