2
votes

I'm experiencing problems when trying to access my sharepoint site using web services (on powershell) given the following configuration:

  • my site is located at https://sharepoint.company.tld/sites/siteid/
  • the WSDL was fetched from https://sharepoint.company.tld/_vti_bin/Lists.asmx (redirected from https://sharepoint.company.tld/sites/siteid/_vti_bin/Lists.asmx)

After building the web service DLL (following these steps), I do a

$list = New-Object Lists

and try to obtain a list by it's GUID (known to me):

$docs = $list.GetList("GUID-HERE")

This results in an exception: screenshot Retrieving the list by it's name is the same.

Doing a $list.GetListCollection() returns me the lists known by https://sharepoint.company.tld and yes, my list is not amongst these. Only some lists containing webparts that shall be used for the real sites and similar stuff.

So, here's the question: Is there any way how I could tell the web services that they shall not access a list located under https://sharepoint.company.tld but to search my lists located at https://sharepoint.company.tld/sites/siteid/Lists?

1
If you paste full code, I can tell you exactly where you have to make the changeMadhur Ahuja

1 Answers

5
votes

Check out this: http://www.nivot.org/2008/02/29/ManipulatingRemoteSharePointListsWithPowerShell.aspx

You just need to set up Url property

$list.Url = "http://sharepoint/sites/root/subsite/_vti_bin/lists.asmx"