Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is there a way to define the links to publish to office clients using Powershell?

To do this action through the UI you would go through:

Central Admin --> Manage Service Applications --> User Profile SA --> Manage --> My Site Settings --> Publish Links to Office Client Applications

Also, for some reason, all links from the publishing site, are being published to office clients, even if they are NOT on this list. Any idea of what might be causing this behaviour?

share|improve this question
    
While I'd imagine there is a way, those properties didn't exist where I'd expect them to be. You should be able to access just about anything in the object model via PowerShell, the question becomes where is that data stored, so you know where to look. I expected them to be part of the service application properties, but alas they weren't there. If I get a chance later I'll look at the service instance and see if they're there. –  webdes03 Oct 31 '11 at 17:06
    
PublishedLinksSyncedListLoader class is related to your question. I am not sure how to use it. msdn.microsoft.com/en-us/library/… –  Amit Kumawat Nov 1 '11 at 12:31
    
Thanks Amit and webdes03. There are some good ideas to explore there. –  Jorge Carvalho Nov 1 '11 at 22:17
add comment

1 Answer

up vote 1 down vote accepted
+50

I've just implemented something along these lines for users of Window 7, it's not quiet what you asked, but it should get you there.

  1. Create a shortcut to the desired document library, typically this will point at \webApplicationHostHeader@DavWWWRoot\ServerRelativeListUrl or \webApplicationHostHeader@SSL\DavWWWRoot\ServerRelativeListUrl depending if you're working over SSL or not

  2. $links = Join-Path $Home 'Links'

  3. Copy your new .lnk file (shorcut) to $links

  4. The user can now choose the list via the favourites section of the Save As dialog in Office clients.

You can of course create the shortcuts/.lnk files via powershell:

$wshshell = New-Object -ComObject WScript.Shell
$lnk = $wshshell.CreateShortCut("$home\Links\SharePointList.lnk")
$targetPath = "\\my.site.host@DavWWWRoot\subsite\list"
$lnk.TargetPath = $targetPath
$lnk.Description = "Shortcut to SharePoint List"
$lnk.Save()
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.