Ok, so I started with the great script from "I love SharePoint" Get-
WebServiceProxy.ps1 found at http://cglessner.blogspot.com/2008/07/powershell-webservices-sharepoint.html
and the URL of the web service I want to user from
http://sharepoint.microsoft.com/blogs/zach/Lists/Posts/Post.aspx?ID=9
. .\Get-WebServiceProxy.ps1
$proxy = Get-WebServiceProxy "http://<server-url>/_vti_bin/
usergroup.asmx"
$proxy.UseDefaultCredentials = $true
I know this is working because I can get the user list with
$proxy.GetUserCollectionFromWeb().Users.User
I am not sure where to go from here though. I found the reference to
UserGroup web service on MSDN
http://msdn.microsoft.com/en-us/library/ms772575.aspx
but all the examples are in VB and C#. C# looks like it should be
close, but I am not making the mental leap. Hopefully somebody can
send me on the right path...
Thanks,
JSimpson
Just an aside, if you want to connect to a sharepoint web service
WITHOUT having to download the 200MB+ .NET sdk, you can use my *pure*
powershell script solution at:
http://www.nivot.org/2007/08/07/NewImprovedGetWebServiceProxyGeneratorForPowerShell.aspx
Once you've got the webservice proxy, it's as easy calling;
ps> $proxy.AddUserToGroup($groupName, $userName, $userLoginName,
$userEmail, $userNotes)
Which is documented (in vb,net/c#) at:
http://msdn.microsoft.com/en-us/library/ms772647.aspx
Hope this helps,
- Oisin
- Oisin
JSimpson
On Oct 1, 4:56 pm, "Oisin (x0n) Grehan [MVP]" <ois...@gmail.com>
wrote:
> http://www.nivot.org/2007/08/07/NewImprovedGetWebServiceProxyGenerato...
>
> Once you've got the webservice proxy, it's as easy calling;
>
> ps> $proxy.AddUserToGroup($groupName, $userName, $userLoginName,
> $userEmail, $userNotes)
>
> Which is documented (in vb,net/c#) at:
>
> http://msdn.microsoft.com/en-us/library/ms772647.aspx
>
> Hope this helps,
>
> - Oisin
>
> - Oisin- Hide quoted text -
>
> - Show quoted text -