Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Sharepoint Automation?

by imrags (Monk)
on Sep 15, 2010 at 10:50 UTC ( [id://860186]=perlquestion: print w/replies, xml ) Need Help??

imrags has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks
I have to login to a sharepoint portal using IE. There are about a thousand files that are orphaned (not checked in)..
I found how to checkin in bulk, but problem is
I need to first take the ownership of the files (Since they were left by the guy who worked before me)...
Since the number of files is huge, when I click on "Select All" and click on Take Ownership, it throws an error "Unknown Error"...
So I thought of writing a perl script to login to the sharepoint, to the required page and click on few checkboxes at a time
and then click on ownership button.

I searched the net for the modules to be used, found that HTTP::DAV can be used, however, i can't use anything that's not in PPM (ActivePerl) and I can't add external repo to it
I tried WWW::Mechanize but it fails. Can you please help????
Raghu

Replies are listed 'Best First'.
Re: Sharepoint Automation?
by Corion (Patriarch) on Sep 15, 2010 at 10:54 UTC

    Copy and paste the source code of HTTP::DAV into your program.

    Alternatively, you can automate the site through your browser, for example using my module, WWW::Mechanize::Firefox. But I'm not sure whether that module is available through PPM either. See above.

    Also, if WWW::Mechanize "fails", maybe you want to investigate and tell us how it fails? Also see Sharepoint or Super Search on "Sharepoint".

Re: Sharepoint Automation?
by marto (Cardinal) on Sep 15, 2010 at 10:56 UTC

    "i can't use anything that's not in PPM (ActivePerl) and I can't add external repo to it"

    Why? Did you try using Win32::IE::Mechanize?

      Can't download (not supposed to) any module. That's why..
      Even though i love Win32::IE::Mechanize...I can't download it here :( I Don't think i can download SOAP::LITE as well.. It's not in PPM...
      Raghu

        "Can't download (not supposed to) any module. That's why.. "

        <Sigh>, read Yes, even you can use CPAN. You seem to have used another IE automantion module previously, why aren't you using it now?

Re: Sharepoint Automation?
by moritz (Cardinal) on Sep 15, 2010 at 11:38 UTC
      Yes: I do use CPAN modules...But only in my home computer...
      I'm sitting @workplace which has certain restrictions...
      It's not just the perl modules (CPAN), I can't download any files (ANY) from anywhere.
      Raghu
        If the inability to download files is your biggest hurdle, you can just build a CPAN mirror with CPAN::Mini, store it on a USB stick (it's about ~1GB in size, smaller if you exclude all Acme modules), and take it to your work computer.
        Perl 6 - links to (nearly) everything that is Perl 6.

        Anywhere? Not even via PPM?

Re: Sharepoint Automation?
by roboticus (Chancellor) on Sep 16, 2010 at 10:23 UTC

    imrags:

    Reassigning ownership of a large group of Sharepoint files. That sounds like a frequent operation for a Sharepoint administrator. Perhaps the solution is a friendly request to your site administrator? Alternatively, maybe Sharepoint relies on the OS to maintain file ownerships & permissions, so your second avenue might be to ask the servers administrator. (I don't use Sharepoint, so this is merely a guess.)

    ...roboticus

      SharePoint does not rely on the O/S for file permissions. SharePoint content is stored as BLOBS in MSSQL databases.

      Reassigning ownership can be done for a fairly large number of files very quickly (by a site collection administrator) but apparently the number here chokes the web interface. Wouldn't be the first time.

      The command-line utility for SharePoint does not, AFAIK, include an operation to assign ownership of files or list items. (UPDATE) There are many other things I've used it for in qx//, but this isn't there.(/UPDATE)

      girarde has been administering two large SharePoint farms fulltime for about a year and a half, and was running farms and/or bits and pieces of them since 2004.

Re: Sharepoint Automation?
by sundialsvc4 (Abbot) on Sep 16, 2010 at 01:12 UTC

    Okay, let’s all get “back on-point” here.   Is there any way that this problem can be solved?

    For instance (and I don’t know the answer to this...) does Microsoft provide any sort of command-line utility that we might be able to fire-off a couple thousand times with qx//?   (I know that they are rather-begrudgingly rediscovering the usefulness of shells these days.)

    THItheboxNK

    This is clearly a one-off task, looking for some quick-and-dirty solution.

      Yes

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://860186]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found