{"id":2871,"date":"2010-06-24T14:51:00","date_gmt":"2010-06-24T14:51:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2010\/06\/24\/using-new-webserviceproxy-to-get-modify-and-add-items-to-a-list-in-sharepoint-2007\/"},"modified":"2024-02-28T13:10:18","modified_gmt":"2024-02-28T21:10:18","slug":"using-new-webserviceproxy-to-get-modify-and-add-items-to-a-list-in-sharepoint-2007","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/using-new-webserviceproxy-to-get-modify-and-add-items-to-a-list-in-sharepoint-2007\/","title":{"rendered":"Using New-WebServiceProxy to get, modify, and add items to a list in SharePoint 2007"},"content":{"rendered":"<p><strong>The motivation<\/strong><\/p>\n<p>Let\u2019s say that you want to retrieve and modify a list in a SharePoint site, but you don\u2019t have access to Microsoft.SharePoint.dll. One possible solution is to try to search online or ask someone to let you copy the dll. If you are able to get a hold of it, you will quickly realize that the Microsoft.SharePoint.dll has some dependencies and that you are stuck again. Well, I will show you how you can get, modify and add items to a list in SharePoint using PowerShell V2.<\/p>\n<p>Pre requisites: First, you need a SharePoint site and credentials to modify that particular list. The illustration below shows the list (DemoList) that I want to modify.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2010\/06\/4606.DemoSite1_thumb_1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-20450\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2010\/06\/4606.DemoSite1_thumb_1.png\" alt=\"Image 4606 DemoSite1 thumb 1\" width=\"279\" height=\"147\" \/><\/a><\/p>\n<h5>Get List Items<\/h5>\n<p>The New-WebServiceProxy Cmdlet creates a web service proxy object which lets you use and manage the web service.<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #006400;\"># The uri refers to the path of the service description, e.g. the .asmx page<\/span>            \r\n<span style=\"color: #ff4500;\">$uri<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #8b0000;\">\"http:\/\/powershell\/TeamSite\/TestTeamSite\/Demos\/_vti_bin\/lists.asmx?WSDL\"<\/span>             \r\n            \r\n<span style=\"color: #006400;\"># Create the service<\/span>            \r\n<span style=\"color: #ff4500;\">$service<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #0000ff;\">New-WebServiceProxy<\/span> <span style=\"color: #000080;\">-Uri<\/span> <span style=\"color: #ff4500;\">$uri<\/span>  <span style=\"color: #000080;\">-Namespace<\/span> <span style=\"color: #8a2be2;\">SpWs<\/span>  <span style=\"color: #000080;\">-UseDefaultCredential<\/span>            \r\n            \r\n<span style=\"color: #006400;\"># The name of the list <\/span>            \r\n<span style=\"color: #ff4500;\">$listName<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #8b0000;\">\"My Demo List\"<\/span>             \r\n            \r\n<span style=\"color: #006400;\"># Create xml query to retrieve list. <\/span>            \r\n<span style=\"color: #ff4500;\">$xmlDoc<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #0000ff;\">new-object<\/span> <span style=\"color: #8a2be2;\">System.Xml.XmlDocument<\/span>            \r\n<span style=\"color: #ff4500;\">$query<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$xmlDoc<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">CreateElement<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"Query\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$viewFields<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$xmlDoc<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">CreateElement<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"ViewFields\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$queryOptions<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$xmlDoc<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">CreateElement<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"QueryOptions\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$query<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">set_InnerXml<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"FieldRef Name='Full Name'\"<\/span><span style=\"color: #000000;\">)<\/span>             \r\n<span style=\"color: #ff4500;\">$rowLimit<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #8b0000;\">\"10\"<\/span>            \r\n            \r\n<span style=\"color: #ff4500;\">$list<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$null<\/span>             \r\n<span style=\"color: #ff4500;\">$service<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$null<\/span>              \r\n            \r\n<span style=\"color: #00008b;\">try<\/span><span style=\"color: #000000;\">{<\/span>            \r\n    <span style=\"color: #ff4500;\">$service<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #0000ff;\">New-WebServiceProxy<\/span> <span style=\"color: #000080;\">-Uri<\/span> <span style=\"color: #ff4500;\">$uri<\/span>  <span style=\"color: #000080;\">-Namespace<\/span> <span style=\"color: #8a2be2;\">SpWs<\/span>  <span style=\"color: #000080;\">-UseDefaultCredential<\/span>              \r\n<span style=\"color: #000000;\">}<\/span>            \r\n<span style=\"color: #00008b;\">catch<\/span><span style=\"color: #000000;\">{<\/span>             \r\n    <span style=\"color: #0000ff;\">Write-Error<\/span> <span style=\"color: #ff4500;\">$_<\/span> <span style=\"color: #000080;\">-ErrorAction:<\/span><span style=\"color: #8b0000;\">'SilentlyContinue'<\/span>             \r\n<span style=\"color: #000000;\">}<\/span><\/pre>\n<p>Now, we use the service object to retrieve the list.<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #00008b;\">if<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #ff4500;\">$service<\/span> <span style=\"color: #a9a9a9;\">-ne<\/span> <span style=\"color: #ff4500;\">$null<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">{<\/span>            \r\n    <span style=\"color: #00008b;\">try<\/span><span style=\"color: #000000;\">{<\/span>                    \r\n        <span style=\"color: #ff4500;\">$list<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$service<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">GetListItems<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #ff4500;\">$listName<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #8b0000;\">\"\"<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #ff4500;\">$query<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #ff4500;\">$viewFields<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #ff4500;\">$rowLimit<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #ff4500;\">$queryOptions<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #8b0000;\">\"\"<\/span><span style=\"color: #000000;\">)<\/span>             \r\n    <span style=\"color: #000000;\">}<\/span>            \r\n    <span style=\"color: #00008b;\">catch<\/span><span style=\"color: #000000;\">{<\/span>             \r\n        <span style=\"color: #0000ff;\">Write-Error<\/span> <span style=\"color: #ff4500;\">$_<\/span> <span style=\"color: #000080;\">-ErrorAction:<\/span><span style=\"color: #8b0000;\">'SilentlyContinue'<\/span>            \r\n    <span style=\"color: #000000;\">}<\/span>            \r\n<span style=\"color: #000000;\">}<\/span><\/pre>\n<p>Let\u2019s take a look at the $list object.<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #ff4500;\">$list<\/span><\/pre>\n<p><span style=\"font-size: xx-small;\">s\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882<\/span><\/p>\n<p>dt\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : uuid:C2F41010-65B3-11d1-A29F-00AA00C14882<\/p>\n<p>rs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : urn:schemas-microsoft-com:rowset<\/p>\n<p>z\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : #RowsetSchema<\/p>\n<p>#whitespace : {<\/p>\n<p>,<\/p>\n<p>}<\/p>\n<p>data\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : data<\/p>\n<p>&nbsp;<\/p>\n<p>The items of the DemoList are located in $list.data.row.<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #ff4500;\">$list<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">data<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">row<\/span><\/pre>\n<p><span style=\"font-size: xx-small;\">ows_ContentTypeId\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : 0x0100F20992473D85F74DBAFD4159A55805FB<\/span><\/p>\n<p>ows_Title\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : Francisco<\/p>\n<p>ows_Car\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : Impreza<\/p>\n<p>ows_IceCream\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : Chocolate<\/p>\n<p>ows_Sport\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : Basketball<\/p>\n<p>ows_ID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : 1<\/p>\n<p>ows_ContentType\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : Item<\/p>\n<p>ows_Modified\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : 2010-06-24 14:58:17<\/p>\n<p>&#8230; (more data) &#8230;<\/p>\n<p>For more information on getting list items visit <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/lists.lists.getlistitems.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/lists.lists.getlistitems.aspx<\/a><\/p>\n<p><strong>Update List Items<\/strong><\/p>\n<p>We want to modify the sport field value from \u201cbasketball\u201d to \u201csoccer\u201d. to do this, we use the $service and $list from the example above.<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #006400;\"># Get name attribute values (guids) for list and view<\/span>            \r\n<span style=\"color: #ff4500;\">$ndlistview<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$service<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">getlistandview<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #ff4500;\">$listname<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #8b0000;\">\"\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$strlistid<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$ndlistview<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">childnodes<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">item<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #800080;\">0<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">name<\/span>            \r\n<span style=\"color: #ff4500;\">$strviewid<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$ndlistview<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">childnodes<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">item<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #800080;\">1<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">name<\/span>            \r\n            \r\n                \r\n<span style=\"color: #006400;\"># Create an xmldocument object and construct a batch element and its attributes. <\/span>            \r\n<span style=\"color: #ff4500;\">$xmldoc<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #0000ff;\">new-object<\/span> <span style=\"color: #8a2be2;\">system.xml.xmldocument<\/span>             \r\n            \r\n<span style=\"color: #006400;\"># note that an empty viewname parameter causes the method to use the default view   <\/span>            \r\n<span style=\"color: #ff4500;\">$batchelement<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$xmldoc<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">createelement<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"batch\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$batchelement<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">setattribute<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"onerror\"<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #8b0000;\">\"continue\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$batchelement<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">setattribute<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"listversion\"<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #8b0000;\">\"1\"<\/span><span style=\"color: #000000;\">)<\/span>            \r\n<span style=\"color: #ff4500;\">$batchelement<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">setattribute<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #8b0000;\">\"viewname\"<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #ff4500;\">$strviewid<\/span><span style=\"color: #000000;\">)<\/span>            \r\n            \r\n            \r\n<span style=\"color: #006400;\"># Specify methods for the batch post using caml. to update or delete, specify the id of the item, <\/span>            \r\n<span style=\"color: #006400;\"># and to update or add, specify the value to place in the specified column<\/span>            \r\n<span style=\"color: #ff4500;\">$id<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #800080;\">1<\/span>            \r\n<span style=\"color: #ff4500;\">$xml<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #8b0000;\">\"\"<\/span>            \r\n            \r\n<span style=\"color: #006400;\"># The row to be modified<\/span>            \r\n<span style=\"color: #ff4500;\">$rowId<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$list<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">data<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">row<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">ows_id<\/span>            \r\n            \r\n<span style=\"color: #006400;\"># New field value<\/span>            \r\n<span style=\"color: #ff4500;\">$newsport<\/span> <span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #8b0000;\">\"soccer\"<\/span>               \r\n            \r\n<span style=\"color: #ff4500;\">$xml<\/span> <span style=\"color: #a9a9a9;\">+=<\/span> <span style=\"color: #8b0000;\">&lt;method id='$id' cmd='Update'&gt;\"<\/span> <span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;field name='ID'&gt;$rowId&lt;\/field&gt;\"<\/span> <span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;field name='Sport'&gt;$newsport&lt;\/field&gt;\"<\/span> <span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;\/method&gt;\"<\/span>            \r\n                    \r\n<span style=\"color: #006400;\"># Set the xml content        <\/span>            \r\n<span style=\"color: #ff4500;\">$batchelement<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">innerxml<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$xml<\/span>            \r\n            \r\n<span style=\"color: #ff4500;\">$ndreturn<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$null<\/span>             \r\n<span style=\"color: #00008b;\">try<\/span> <span style=\"color: #000000;\">{<\/span>            \r\n    <span style=\"color: #ff4500;\">$ndreturn<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #ff4500;\">$service<\/span><span style=\"color: #a9a9a9;\">.<\/span><span style=\"color: #000000;\">updatelistitems<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #ff4500;\">$listname<\/span><span style=\"color: #a9a9a9;\">,<\/span> <span style=\"color: #ff4500;\">$batchelement<\/span><span style=\"color: #000000;\">)<\/span>             \r\n<span style=\"color: #000000;\">}<\/span>            \r\n<span style=\"color: #00008b;\">catch<\/span> <span style=\"color: #000000;\">{<\/span>             \r\n    <span style=\"color: #0000ff;\">write-error<\/span> <span style=\"color: #ff4500;\">$_<\/span> <span style=\"color: #000080;\">-erroraction:<\/span><span style=\"color: #8b0000;\">'SilentlyContinue'<\/span>            \r\n<span style=\"color: #000000;\">}<\/span><\/pre>\n<p>For more information on updating list items visit <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms440289.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/ms440289.aspx<\/a>.<\/p>\n<p><strong>Add New Items to the List <\/strong><\/p>\n<p>To add a new row to the list, everything is the same as in the update list items example above, the only difference is the xml content.<\/p>\n<p>In this case, the new row will contain the following information:<\/p>\n<p>Title: James<\/p>\n<p>Car: A4<\/p>\n<p>Sport: Swimming<\/p>\n<p>Icecream: Strawberry Cheese Cake<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #ff4500;\">$xml<\/span> <span style=\"color: #a9a9a9;\">=<\/span> <span style=\"color: #8b0000;\">\"&lt;method id='$id' cmd='New'&gt;\"<\/span> <span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;field name='Title'&gt;James&lt;\/field&gt;\"<\/span><span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;field name='Car'&gt;A4&lt;\/field&gt;\"<\/span><span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;field name='Sport'&gt;Swimming&lt;\/field&gt;\" <\/span><span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;field name='IceCream'&gt;Strawberry cheese Cake&lt;\/field&gt;\" <\/span><span style=\"color: #a9a9a9;\">+<\/span>            \r\n        <span style=\"color: #8b0000;\">\"&lt;\/method&gt;\"\"<\/span><\/pre>\n<p>At the end, our SharePoint list looks like this.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2010\/06\/1145.DemoSite2_thumb.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-20451\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2010\/06\/1145.DemoSite2_thumb.png\" alt=\"Image 1145 DemoSite2 thumb\" width=\"308\" height=\"139\" srcset=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2010\/06\/1145.DemoSite2_thumb.png 308w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2010\/06\/1145.DemoSite2_thumb-300x135.png 300w\" sizes=\"(max-width: 308px) 100vw, 308px\" \/><\/a><\/p>\n<p>Cheers,<\/p>\n<p>Francisco Gomez Gamino [MSFT]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The motivation Let\u2019s say that you want to retrieve and modify a list in a SharePoint site, but you don\u2019t have access to Microsoft.SharePoint.dll. One possible solution is to try to search online or ask someone to let you copy the dll. If you are able to get a hold of it, you will quickly [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>The motivation Let\u2019s say that you want to retrieve and modify a list in a SharePoint site, but you don\u2019t have access to Microsoft.SharePoint.dll. One possible solution is to try to search online or ask someone to let you copy the dll. If you are able to get a hold of it, you will quickly [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/2871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=2871"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/2871\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=2871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=2871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=2871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}