PowerShell Script for Setting the Welcome Page View of a document set

Hi,
We are using document set in the document library and we have created the separate view in the document set and it will show only particular metadata columns. We need to change from default view to another view. For this, we need to write the power shell
script and update the document set welcome page view link in the document set template. Please let me know how we can get this.
Thanks,
Mylsamy

Hey Mylsamy,
welcome page view is stored in $contenttype.XmlDocuments. Here is how you can change the view using powershell:
$web = Get-SPWeb "WEBURL"
$list = $web.Lists["LISTNAME"]
$contenttype = $list.ContentTypes["CONTENTYPENAME"]
$viewid = $list.Views["VIEWNAME"].Id
$xmldocs = $contenttype.XmlDocuments
foreach($xmldoc in $xmldocs)
if($xmldoc.Contains("WelcomePageView"))
Write-Host "XML contains WPV"
$newview = [XML] @"
<wpv:WelcomePageView xmlns:wpv="http://schemas.microsoft.com/office/documentsets/welcomepageview" ViewId="$viewid" />
$xmldocs.Delete("http://schemas.microsoft.com/office/documentsets/welcomepageview")
$xmldocs.Add($newview)
break;
$contenttype.Update($updateChildren, $false)
Write-Host "Welcome Page View updated at " $list.Title
Regards,
Alexander 

Similar Messages

  • My home page is Google but everytime I close Firefox it opens to the last page viewed. Startup is set to "show my homepage" but it's still not working. HELP!!

    My home page is Google but everytime I close Firefox it opens to the last page viewed. Startup is set to "show my homepage" but it's still not working. I've tried so many things but nothing seems to work. Can someone please give me "Simple" answer.

    Running FF 18, lots of my add ons no good with 20 on PC.
    Thanks

  • Start page lacks menu items - unlike "How to set the home page" view

    I have just downloaded the beta of Firefox 4 and am attempting to reproduce opening home page from previous version. Directions on accomplishing this (loading the NY Times front page) depend on a menu bar with "File, Edit, View, History" etc. There are not visible. They are shown in the directions on Firefox Help but not on my computer. How to do this??

    Click the Firefox button, then click Options. This will open the options dialog that the [[How to set the home page]] article refers to.
    When viewing the support articles, in the right-hand column there is a section titled "Help With:", make sure it is set to Windows and Firefox 4 to get help relevant to the version you are using. In some articles you get different content when you select Firefox 4.

  • Powershell script to change the a column value of all documents in a site.

    Hi,
    I need a powershell script to change the value of a column (a site column which has been added to all document libraries) in all documents in a site,
    For example: 
    -column 1 is a site column added to all libraries
    the value of column 1 of all documents under this site: http://intranet.doman/ex1 should be equal to V1
    the value of column 1 of all documents under this site: http://intranet.doman/ex2 should be equal to V2
    So, if I can write a powershell script to change the value of all documents in a site, I can modify it for different site that I have and run it for each of them individually,

    cls
    # Is dev version?
    $dev = $false
    # Configuration
    $termStore = "Managed Metadata Service"
    $group = "G1"
    $subjectMatterTermSetName = "Subject Matter"
    # Check if SharePoint Snapin is loaded
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {
         Add-PSSnapin Microsoft.SharePoint.PowerShell
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Taxonomy") | Out-Null
    function GetTermStore($site, $termStore, $group, $termSet) {    
        $session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
        $termStore = $session.TermStores[$termStore]
        $group = $termStore.Groups[$group]
        $termSet = $group.TermSets[$termSet]
        return $termSet
    if($dev) {
        Write-Host "Running DEV version..."
        $webUrl = "http://Site1"   
        $libraryName = "L1"
        $subjectMatter = "C1"
    } else {
        $webUrl = Read-Host "Enter Site URL" 
        $libraryName = Read-Host "Enter Document Library name"
    $subjectMatter = Read-Host "Enter Subject Matter"
    try {
        $web = Get-SPWeb $webUrl
        $site = $web.Site
        $library = $web.Lists[$libraryName]
        $items = $library.GetItems()
        $subjectMatterTermSet = GetTermStore $site $termStore $group $subjectMatterTermSetName
        $subjectMatterTerm = $subjectMatterTermSet.GetTerms($subjectMatter,$true) | select -First 1
        foreach($item in $items) {
            if([string]::IsNullOrEmpty($item["Subject Matter"])) {     
                #Write-Host "Filename: $filename / Keywords: $keywords / Subject Matter: $subjectMatter / Document Type: $documentType"        
                Write-Host "Updating $($item["ows_FileLeafRef"])..."           
                # Set Subject Matter column
                $subjectMatterField = [Microsoft.SharePoint.Taxonomy.TaxonomyField]$item.Fields["Subject Matter"]
                $subjectMatterField.SetFieldValue($item,$subjectMatterTerm)
                # Update Item
                $item.SystemUpdate()
    catch
        $ErrorMessage = $_.Exception.Message
        Write-Host "Something went wrong. Error: $ErrorMessage" -ForegroundColor Red

  • How do I set the default page view for all pages?

    I make my own ebooks in Adobe Acrobat X Pro.
    I would prefer to render pdfs and set every page in an ebook to the Fit Page Magnification setting.
    I can not figure out how to set all pages to this at one time. I have to edit each page individually.
    Does anyone know how to do this at one time?

    With the PDF open in Acrobat open the PDF's properties.
    Select the "Initial View" tab.
    Configure as desired.
    Be well...

  • How to write Java script for refering the 1st page text field from 2nd page?

    Hello I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy is,
    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    Now, i have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "Value_ABCD", THEN the 'Text_Field_B_1' of page_2 should be 'readOnly'. Pls let me know Wht is the Java script for this requirement?

    if (xfa.event.newText=="ABCD")
    VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";
    place script on change event of Text_FieldA_2

  • Powershell script for put the particular service in to Maintenance mode

    Hi Everyone,
    I have requinquent to schedule the Maintenance mode for service. If anyone help with script to put the service into maintenance mode, then i can schedule the same through Task Scheduler. 
    Thanks in advance.
    Regards
    Karthick

    Hi,
    Please have a look on:
    http://technet.microsoft.com/en-us/library/hh918505(v=sc.20).aspx
    http://blog.coretech.dk/msk/operations-manager-2012-maintenance-mode/
    Cheers
    Christoph Maresch | My blogs: blog.cmaresch.at | XING:
    Christoph Maresch
    | Linkedin:
    Christoph Maresch

  • Using Acrobat Reader activeX to get the current page views in a document

    Hello,
    I'm using the Acrobat Reader ActiveX control.
    How can I use this API (or any other way) to get the current page of the PDF document inside the Acrobat reader ActiveX control ?
    Thanks
    Ariel

    Aandi,
    I reckon that you might be right.
    But as side note, maybe Adobe will lose me and others as contributers for her PDF oriented solutions for other formats.
    In the long run experts can tell which approach is better: a .Net like approach (no limitations upon development issues for ) or this kind of an approach.
    Thank you very very much for you help!
    Ariel

  • PowerShell Script to get the details Like Scope,Last Deployed date and Name for a Solution Deployed in the Farm.

    Hi Experts,
    I am trying to  build a PowerShell Script to get the details Like Scope,Last Deployed date and Name for a Solution Deployed in the Farm.
    Can anyone advise on this please.
    Regards

    Get-SPSolution|Select Name,Scope,LastOperationResult,LastOperationEndTime|Export-CSV "SPInstalledSolutions.csv" -NoTypeInformation
    SPSolution properties
    Get-SPSolution
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • How do i make a photo slideshow / banner for the welcome page in iWeb

    How do i create a photo slideshow or fading slidshow for the welcome page in iweb

    There are trillions of slideshows to be found on the internets.
    Download the one you like, make it work the way you want and put it on the server.
    Display it in the browser to see if it looks the way you want.
    Then use the <iframe> html element to display it in a HTML Snippet.
    Like this :
    http://www.wyodor.net/iWebBlogTest/Wyodor_1/WebBanner.html
    http://www.wyodor.net/_Demo/MyHouse/
    You can also browse/search this forum to see if it has been discussed before. It has.

  • How do I set the Home Page for a newly open tab using the File Tab Menu??

    When I open a new tab, is there a way to set the home page the new tab will use when it is opened, or will new tabs always be opened as blank pages?

    I have new windows opening when I click on a link. Or when I click on the FF-Icon. New windows are the default setting.
    When a new window opens, I get a Google home page and can instantly type in a search phrase.
    With the above in mind, sometimes I want to keep search classes in the same window. In a sense I'm using the Window with no tabs, to generate a tab by using the File Tab option.
    When a Tab is selected where new windows will launch a new page, and not a new tab, the process of forcing a new tab onto the window will produce a tab page that is Blank, and the new tab label description displayed in the tab area shows the words "New Tab". That tab's URL address bar is blank. Zip - nothing displayed.
    When a blank page tab appears, I click on the HOME button you helped me remodel, and the "New Tab" description in the tab label area changes from "New Tab" to "Google".
    My question was to ask, if there was a way I could do something to make FF4 do that Home page assignment on its own. In the early FF days I found you could sometimes go into the bowels of FF, find some form of INI or SETTINGS type file, look for a Keyword reference that would tell FF to do something different, and Viola, emotional issue resolved. In this case, I'm trying to "Gild the Lilly" by asking if you, or someone else might have a rabbit they can pull out of their hat, just like you did when you helped me move my Home button, and have that rabbit show me how to do something that default FF-Options section doesn't support.
    Did I do a better job of explaining the issue this time?
    Thanks again for the response.
    When I

  • I downloaded the new version of Mozilla and tried to install an add-on to allow me to set the home page for new tabs. The app says it has downloaded but does not open new tabs as my home page (google) - any suggestions what I can do?

    I downloaded the new version of Mozilla and tried to install an add-on to allow me to set the home page for new tabs. The app says it has downloaded but does not open new tabs as my home page (google) - any suggestions what I can do?

    I've been working on this all day!!! I've tried everything I know of and can't get it to load either. Sounds like lots of people are having problems. Here is what I have so far...I have uninstalled EVERYTHING on my pc from apple and reinstalled itunes to no avail. I have tried all sorts of things I've read as fixes online. NOTHING has worked. Here is something interesting that i have noticed though. my main pc (which is the one i have always managed my itunes account with for years) is a 32 bit system running windows 7. Yesterday I installed itunes for the first time on my new netbook which is a 64 bit (windows 7) system and it works just fine. i have three other laptops (all window 7) in my household that are all 64 bit operating systems and ALL have updated to 10.5 and THEY ALL work fine. this is FOUR 64 bit systems ALL updated w/10.5 that work and ONE that is a 32 bit that will not. Can't get any help from apple. their suppot *****! I want to get someone on the **** phone or a live chat but cant. *** APPLE????? please let mw know if you find SOMETHING i can try next. I'm out of ideas and patience!

  • How do I set the home page for a new tab?

    How do I set the web page for when I open a new tab? Whenever I open a new tab it goes to an error site which freezes my firefox browser for a while. How do I change that? I want to open new tabs with google being the home page. I need to set up the homepage for a new tab NOT a new window. Please help! !

    If Google is set as your Homepage in Firefox you can middle-click ''(push down on the mouse wheel)'' to open Google in a new Tab.
    Or, you can add the feature to Firefox where clicking the New Tab button on the Tab Bar opens your Homepage in a new Tab. <br />
    https://addons.mozilla.org/en-US/firefox/addon/new-tab-homepage/
    And if you have a different Homepage set, this extension allows for any page you set in the extension's options to open when you use the new Tab button. <br />
    https://addons.mozilla.org/en-US/firefox/addon/newtaburl/

  • Howcan I set the home page for new tabs?

    When I open a new tab, it opens up as a blank page. How do I setup Firefox so that the new tabs open in my home page?
    ''locked by a moderator due to age and that Firefox 13 has a new feature for a new tab''

    Thanks, but the problem I'm trying to solve is to get my home page to open automatically when I am already in Firefox and click on the new tab "+" sign to the right of my most recent tab. I have not found a solution to this in the link "How to set the home page" nor in the various help pages on new tabs.

  • I desperately would like to update Firefox to version 10 from version 9 but each time I try, I am stuck with FF10 checking addons for comparability and the Welcome page opening every time I start the browser.

    Windows 7 64 bit
    I desperately would like to update Firefox to version 10 from version 9 but each time I try, I am stuck with FF10 checking addons for compatability and the Welcome page opening every time I start the browser. I continue to have to revert to version 9 to resolve this issue.

    Sorry to be a while getting back! Tried all of that with no sucess so this AM, bit the bullet and deleted the FF folder from programs and downloaded and installed FF 10.01. Still was plagued with the same problem. Went into the appdata folder and there were two sessionstore.js files. Deleted them both, restarted the browser and no compatibility check for add-ons was done at start up and the extra tab for Welcome to FF was no longer opening Everything seems to be working as it should and I did not loose any of my settings.. Thank you for trying to help and I hope my solution helps anyone else who might experience this in the future. Here's hoping the next update goes smoother!

Maybe you are looking for

  • Jframe is flickering -- Urgent help please!

    Basically i want to resize the window when i click some button say, NEW or EDIT and making some components visible. I am using setSize() method to resize the Jframe/window and setVisible() method. Do i need to use other methods. If you need some othe

  • Galaxy 4 16 Gb add 32 Gb Microcard  possible?  + Volume

    Just wondering. I have the Galaxy S4  16Gb.    I know I can add a 16 microcard...  But am I able to add a 32 Gb card ? For some reason, I remember seeing somewhere that you can only double the amount of the phone memory. But seems kinda odd.. Thanks

  • PSE 12 running slow in Windows 7?

    I have just installed PSE 12 on a Windows 7 platform and it runs very slow and freezes when I try to selct files in organizer. Is there anyhting I can do in settings, etc.?

  • How can I use the "home" and "end" buttons

    I have an external apple keyboard (full style, with number pad and all) plugged into my macbook.  However, the "home" and "end" buttons don't function the way I'd like (i.e. they don't go to the beginning or end of a line). Can I ever get this to wor

  • Slide Clips in Multicam Angle Editor?

    Trying to help a friend learn multicam in FCP X, and he's run into an issue with the clip sync that's making him need to manually sync up one clip. Problem: clips can't move. They're snapping back to where they were before. Anybody know of a way to f