Gary_Brown_Applied
asked on
Get documentset fields in powershell
I am using the following powershell to add an entry to my document set.
I end up with a new documentset in my libruary called "My Title" as expected, but the other fields I was trying to populate (RMCode and RMDescription) are blank.
How do I find out the names for these fields? or
What am I doing wrong?
Thanks.
$web = Get-SPWeb http://mysp/products
$list = $web.Lists["RMSpecs"]
$cType = $list.ContentTypes["RM Spec"]
[Hashtable]$docsetProperties = @{"RMCode"="MyRM";"RMDescription"="myStuff"}
$newDocumentSet = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::Create($list.RootFolder,"My Title",$cType.Id,$docsetProperties)
I end up with a new documentset in my libruary called "My Title" as expected, but the other fields I was trying to populate (RMCode and RMDescription) are blank.
How do I find out the names for these fields? or
What am I doing wrong?
Thanks.
Use U2U Camel Query Builder to find out the exact name of the fields which you are using
try ows_RMCode and ows_RMSDescription
Failing that, try sharepoint manager or other to get the true internal names
Failing that, try sharepoint manager or other to get the true internal names
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Rainer, showed me exactly what I needed to know.