How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

Hi,
How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
Any help would be greatly appreciated.
Thank you.
AA.

Hi,
According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
I suggest you can get the document sets properties like the PowerShell Command below:
[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
$siteurl="http://sp2013sps/sites/test"
$listname="Documents"
$mysite=new-object microsoft.sharepoint.spsite($siteurl)
$myweb=$mysite.openweb()
$list=$myweb.lists[$listname]
foreach($item in $list.items)
if($item.contenttype.name -eq "Document Set")
if($item.folder.itemcount -eq 0)
write-host $item.title
Then you can use Export-Csv PowerShell Command to export to a CSV file.
More information:
Powershell for document sets
How to export data to CSV in PowerShell?
Using the Export-Csv Cmdlet
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • How to get DocSet property values in a SharePoint library into a CSV file using Powershell

    Hi,
    How to get DocSet property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi AOK,
    Would you please post your current script and the issue for more effcient support.
    In addition, to manage document set in sharepoint please refer to this script to start:
    ### Load SharePoint SnapIn
    2.if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
    3.{
    4. Add-PSSnapin Microsoft.SharePoint.PowerShell
    5.}
    6.### Load SharePoint Object Model
    7.[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
    8.
    9.### Get web and list
    10.$web = Get-SPWeb http://myweb
    11.$list = $web.Lists["List with Document Sets"]
    12.
    13.### Get Document Set Content Type from list
    14.$cType = $list.ContentTypes["Document Set Content Type Name"]
    15.
    16.### Create Document Set Properties Hashtable
    17.[Hashtable]$docsetProperties = @{"DocumentSetDescription"="A Document Set"}
    18.$docsetProperties = @{"CustomColumn1"="Value 1"}
    19.$docsetProperties = @{"CustomColum2"="Value2"}
    20. ### Add all your Columns for your Document Set
    21.
    22.### Create new Document Set
    23.$newDocumentSet = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::Create($list.RootFolder,"Document Set Title",$cType.Id,$docsetProperties)
    24.$web.Dispose()
    http://www.letssharepoint.com/2011/06/document-sets-und-powershell.html
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to get the 'text' property value of a button in coding?

    Hi Experts,
    I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button.  I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
    Thanks and Regards
    Basheer

    Hi,
    My event is like this.
    public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         String s =  ?  ; // should get the 'text' property of clicked button
         fillInput(s);     // function to be called
    The called function is,
    public void fillInput( java.lang.String id )
        String str=wdContext.currentContextElement().getNum();
        str = str + id;
        wdContext.currentContextElement().setNum(str);
    How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
    Thanks and Regards,
    Basheer

  • How to get bean's property value ?

    Hi all,
    Hi I'm using JSF 1.2
    How can I get and set session bean's property value in request bean action method ?

    Inject the session scoped bean as managed property of the request scoped bean. You can do this in faces-config.xml as outlined here.

  • How to get the iView Property value in NWDS

    Hi all,
    I my requirement I need to get some of the iView Property Value in NWDS.
    Can anybody help me for this?
    Helpful answers will appreciate.
    Thanks & regards,
    Kathiresan R

    Steps
    1. Define the properties in portalapp.xml
    <component-profile>
    <property name="user" value="asterix">
      <property name="personalization" value="dialog"/>
      <property name="plainDescription" value="User name"/>
    </property>
    </component-profile>
    2. Within the doContent(request is a signature in doContent) method of your AbstractPortalComponent please
    add the following code to access the property:
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        IPortalComponentProfile profile = request.getComponentContext().getProfile();
        String Name = profile.getProperty("user");

  • How to remove HTML encoding from csv file using powershell

    Hi guys i am exporting data from a sharepoint list using powershell which works fine. My problem is that some of the fields contain HTML mark up. Is there a way to remove all of the html mark up from the array before writing it to csv ?
    I have tried playing about with System.Web.HttpUtility.HtmlDecode but with no luck the code runs but no html is removed.
    Below is a sample of my script.
    Set-Variable HOME $env:USERPROFILE -Force
    (Get-PSProvider FileSystem).Home = $HOME
    if(-not(Get-PSSnapin | where { $_.Name -eq "Microsoft.SharePoint.PowerShell"}))
    Add-PSSnapin Microsoft.SharePoint.PowerShell;
    # imports assembly needed for url stuff to do
    Add-Type -AssemblyName System.Web
    $SPWeb = Get-SPWeb "http://site url"
    $SPList = $SPWeb.Lists["List Name"]
    $exportlist = @()
    $SPList.Items | foreach {
    $obj = New-Object PSObject -Property @{
    "Employee full name" = $_["EMPLOYEEFNAME"]
    "Employee login name" = $_["EMPLOYEENAME"]
    "Department Name" = $_["DEPARTMENT"]
    System.Web.HttpUtility.HtmlDecode("OBJECTIVESTOBEACHIEVED_0") = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_0"]
    "OBJECTIVESTOBEACHIEVED_1" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_1"]
    "OBJECTIVESTOBEACHIEVED_2" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_2"]
    "OBJECTIVESTOBEACHIEVED_3" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_3"]
    "OBJECTIVESTOBEACHIEVED_4" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_4"]
    "OBJECTIVESTOBEACHIEVED_5" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_5"]
    "OBJECTIVESTOBEACHIEVED_6" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_6"]
    "OBJECTIVESTOBEACHIEVED_7" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_7"]
    $exportlist += $obj
    $exportlist | select "Employee full name", "Employee login name", "Department Name", "OBJECTIVESTOBEACHIEVED_0", "OBJECTIVESTOBEACHIEVED_1", "OBJECTIVESTOBEACHIEVED_2", "OBJECTIVESTOBEACHIEVED_3", "OBJECTIVESTOBEACHIEVED_4", "OBJECTIVESTOBEACHIEVED_5", "OBJECTIVESTOBEACHIEVED_6", "OBJECTIVESTOBEACHIEVED_7" | Export-Csv ~/Export.csv -noType
    $SPWeb.Dispose()
    any help would be much appreciated.

    Should have googled before posting !
    "OBJECTIVESTOBEACHIEVED_0" = [Microsoft.SharePoint.Utilities.SPHttpUtility]::ConvertSimpleHtmlToText($_["F1_S4a_OBJECTIVESTOBEACHIEVED_0"],-1) -replace '\s+', ' '
    Clears all the additional white space. As always jrv you
    have saved the day, many thanks for all the help.
    Mal

  • How to Compare 2 CSV file and store the result to 3rd csv file using PowerShell script?

    I want to do the below task using powershell script only.
    I have 2 csv files and I want to compare those two files and I want to store the comparision result to 3rd csv file. Please look at the follwingsnap:
    This image is csv file only. 
    Could you please any one help me.
    Thanks in advance.
    By
    A Path finder 
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Not certain this is what you're after, but this :
    #import the contents of both csv files
    $dbexcel=import-csv c:\dbexcel.csv
    $liveexcel=import-csv C:\liveexcel.csv
    #prepare the output csv and create the headers
    $outputexcel="c:\outputexcel.csv"
    $outputline="Name,Connection Status,Version,DbExcel,LiveExcel"
    $outputline | out-file $outputexcel
    #Loop through each record based on the number of records (assuming equal number in both files)
    for ($i=0; $i -le $dbexcel.Length-1;$i++)
    # Assign the yes / null values to equal the word equivalent
    if ($dbexcel.isavail[$i] -eq "yes") {$dbavail="Available"} else {$dbavail="Unavailable"}
    if ($liveexcel.isavail[$i] -eq "yes") {$liveavail="Available"} else {$liveavail="Unavailable"}
    #create the live of csv content from the two input csv files
    $outputline=$dbexcel.name[$i] + "," + $liveexcel.'connection status'[$i] + "," + $dbexcel.version[$i] + "," + $dbavail + "," + $liveavail
    #output that line to the csv file
    $outputline | out-file $outputexcel -Append
    should do what you're looking for, or give you enough to edit it to your exact need.
    I've assumed that the dbexcel.csv and liveexcel.csv files live in the root of c:\ for this, that they include the header information, and that the outputexcel.csv file will be saved to the same place (including headers).

  • In Workflow, How to get and set table values at runtime.

    Hi All,
    I m having a doubt,
    here in my workflow, i have used a  object where in i have made a 'Z' method which is suppose to populate a table container.
    Actually after using std SOFC-COMPOSE activity my table which has 4 user id's contains only 1 user id who has runt that activity.
    So in order to get all 4 user's back in the container i made a 'Z' method, which will populate the values back in tht user_id's table.
    But it is not doing so.
    Can you please help me as to how to do it?
    I m sending u the code that i hav written in the method.
    There are 2 codes i tried.
    first:
    BEGIN_METHOD ZPOPULATE CHANGING CONTAINER.
    data : User_Release type table of zfitlevel-zuid,
           wa_user_release type zfitlevel-zuid.
    data: User type table of zfitlevel-zuid.
    swc_get_table container 'User_Release'  User_Release.
    wa_user_release = 'USNOSIJOH'.
    append wa_user_release to User_Release.
    wa_user_release = 'USNOSOSAT'.
    append wa_user_release to User_Release.
    wa_user_release = 'USNOANMER'.
    append wa_user_release to User_Release.
    swc_set_table container 'User_Release'  User_Release.
    END_METHOD.
    and second :  Suppose User is the tabel that has correct values at run-time.
    BEGIN_METHOD ZPOPULATE CHANGING CONTAINER.
    data : User_Release type table of zfitlevel-zuid,
           wa_user_release type zfitlevel-zuid.
    data: User type table of ZUSRID.
    swc_get_table container 'User'  User.
    swc_get_table container 'User_Release'  User_Release.
    User_Release[] = User[].
    swc_set_table container 'User_Release'  User_Release.
    END_METHOD.
    Please let me know if anyone can solve my doubt asap.
    Thanks & Regards,
    Alpa

    Hi
    Thanks for the reply.
    But here in my case, there is a problem.
    The table container in Workflow wil hav dynamic entries.
    It will hav to pick it from other dynamic container elements (all single line) and append them in this container table.
    For eg:
    at runtime:
    User1 = 'USABC'
    User_table = 'USABC'
                       'USLMN'
                       'USPQR'
                       'USXYZ'
    after one of these user execute a compose mail activity of SOFM-COMPOSE,
    the User_table is left with only one user id who has executed the activity compose.
    suppose USABC executes it so after that the conatiner values are:
    User1 = 'USABC'
    User_table = 'USABC'
    Now i want that this table container shud hav all 4 values even after that activity for other purpose.
    So how can i achieve that?
    Thanks & Regards,
    Alpa
    Edited by: siri on Jul 9, 2008 8:32 PM

  • How to get and set the column order in SharePoint list forms

    Hi,
    I want to read the column order of the SharePoint list forms in SharePoint 2003 sites using any of the available web services and need to set the same order
    in the newly created list in SharePoint 2010.
    I am able to read the fields from SharePoint 2003 and creating the list with same fields in SharePoint 2010, but the column order is not maintaining in
    list forms.
    Also, I need to created the views from 2003 site to 2010 site.
    Please help me...
    Thanks in advance...

    Hi,
    Please try to use the following code to programatically change the order.
    SPList list = web.Lists["Example List"];
    if (list.ContentTypes.Count > 0)
    SPContentType ct = list.ContentTypes[0];
    string[] names = {"Example_x0020_One", "Example_x0020_Two", "Example_x0020_Three"};
    ct.FieldLinks.Reorder(names);
    ct.Update();
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/en-US/ce66fd65-2882-4bda-8142-89e116d8b90f/how-to-set-the-order-of-the-fields-in-list-forms?forum=sharepointdevelopmentprevious
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to get zclass attribute's value inside  "Execute_default" method

    Hi all,
    I am displaying a link in UD step under "Objects & Attachmnents".I am using zclass. I created a attribute in zclass and i am creating a instance (background task) before this UD step and i will be setting a attribute of the zclass inside this create instance method.
    My problem is, if i click the link, this method "BI_OBJECT~EXECUTE_DEFAULT_METHOD" is getting executed but i am not able to get the attribute value inside this method, eventhough i am setting the attribute value before the UD step.
    Pls let me know, how to get the attribute's value inside "Execute_default" method, as i need to process further using this attribute.
    P.S: I tried with both static & instance attribute. I can achieve the same using ZBO but my client needs to use only class.
    -Vinoth
    Edited by: S Vinoth on Jan 29, 2010 7:23 AM

    Lei,
    If you are concerned only about a couple of attributes, then you can manage with a separate copy of the data. But if the data is in bulk, better leave it to pl/sql side of validation.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Get the pc name with domain name and add it to my properties file using commands

    i want to get the pc name with domain name and add it to my properties file using powershell  .
    sid

    function Get-Environment{
    [environment]|Get-Member -Static -MemberType Properties |
    ForEach-Object{
    if($_.Name -ne 'StackTrace'){
    $v=[scriptblock]::Create("[environment]::$($_.Name)").Invoke()
    New-Object PsCustomObject -Property ([ordered]@{Name=$_.Name;Value=$v[0]})
    Get-Environment
    Get-Environment | Out-String | Out-File environment.txt
    ¯\_(ツ)_/¯

  • How to get or set default fiscal year value in billing doc

    Hi All, my question is simple, how to get or set default fiscal year value (VBRK_GJAHR) in billing document.. is it possible.
    Thanks.
    Regards,
    Michael

    Hi Michel
    If you feel that the fiscal year value should come  in the billing document then you have to use a user exit USEREXIT_NUMBER_RANGE .
    As this is a related to ABAP , you should give the inputs and ABAP'ers will give the number range as per our requirement .
    Regards
    Srinath

  • Sharepoint Workflow : how to get document full path + file name into variable?

    Hi,
    Anybody knows how to get document full path + file name into a variable in Sharepoint 2010 workflow?
    Example http://sp1:80/InvoiceQueue/Shared Documents/123.pdf
    I am using List Workflow which links to a document library.

    Hi SAMSUNG,
    According to your description, my understanding is that you want to get the full path of a document in a list workflow.
    You can set the variable to the Enconded Absolute URL of the document. The screenshot is my testing. In my testing (in the red area), when the title of a document was equal to the tile of the current item, set a variable to the Enconded Absolute URL of the
    document. I used ‘Log to history list’ to check the value of the variable in Workflow History .
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to get the selected node value of a tree which is build on java code

    Hi Experts,
    How can i get the selected node value if I build the tree programatically.
    I am using the following code in selectionListener but it is throwing error.
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    CollectionModel _tableModel =
    (CollectionModel)treeTable.getValue();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    String selectedQaCode ="";
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    String nodeStuctureDefname =
    nodeBinding.getHierTypeBinding().getStructureDefName();
    selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
    where I am using following link to create a tree with java code.
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
    Please help me in resolving this issue.
    Regards
    Gayaz

    Hi,
    you should also move
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    out of the while loop as this is not necessary to be repeated for each key in the set
    Frank

  • How to get selected Row/Cell value in i5Grid

    Hi Friends,
    Can anyone help to how to find the selected Row/Cell value of a i5Grid object. I am able to register the event handlers which are getting invoked on row/cell selection. But I want to know how can I get the value of selected Cell/Row. I would like to add selected Items from one i5Grid to another one.
    So want to know how can I get and set the value of i5Grid object.
    MII version 14.0 SP4 Patch
    Thank in advance
    Shaji Chandran

    Hi Shaji,
    Here is my code.
    <!DOCTYPE HTML>
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <META http-equiv="X-UA-Compatible" content="IE=edge">
        <META http-equiv='cache-control' content='no-cache'>
        <META http-equiv='expires' content='0'>
        <META http-equiv='pragma' content='no-cache'>
        <SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid,i5SPCChart"></SCRIPT>
        <SCRIPT>
            var Grid = new com.sap.xmii.grid.init.i5Grid("STC/C5167365/i5Grid_TagQuery", "STC/C5167365/TagQuery");
            Grid.setGridWidth("640px");
            Grid.setGridHeight("400px");
            Grid.draw("div1");
        function setCellValue()
        Grid.getGridObject().setCellValue(1,1,"Set");
        function setCellValueAgain()
        Grid.getGridObject().setCellValue(1,1,"Changed Again");
        </SCRIPT>
    </HEAD>
    <BODY>
        <DIV id="div1"></DIV>
        <INPUT type="Button" value="setCellValue" onClick="setCellValue()"/>
        <INPUT type="Button" value="setCellValueAgain" onClick="setCellValueAgain()"/>
    </BODY>
    </HTML>
    Regards,
    Sriram

Maybe you are looking for

  • Error While processing an Dimension

    Hi Experts, while processing an Dimension i am getting an error while processing, but in the BW  it is showing 2 Dimension. How to check which is the Latest/ Right one. Kindly Help Best Regards, Bhupendra Arya

  • I am getting error like "nca_connect_server: cannot communucate to host "

    I am getting error like "nca_connect_server: cannot communucate to host " while replaying my script through Loadrunner 9.1 virtual User Script started Starting action vuser_init. vuser_init.c(12): nca_set_connect_opt("SCALE_INFO") vuser_init.c(16): E

  • What's the difference between SNC and SRM?

    we will sell SNC in Q2.But i don't know what is the difference between SNC and SRM. i've heard SNC suit Direct procurement better than SRM... Pls give me the advice and information. good regards kenji

  • Got itunes installed but...

    when i try to open it i get... "iTunes has encounted a problem and needs to close. We are sorry for the incovenience. If you were in the middle of something, the information you were working on might be lost. Please tell Microsoft about this problem.

  • How to save the state of a program ?

    I am working on a program, where one can open several tabs with JEditorpanes, and in the tabs one can read a webpage. I was wondering if there is a way to save the state of the program. For example the program starts with three tabs, but say that the