PowerShell - how to list all master pages of all sites in web application?

Hi there,
Is it possible to list all of the master pages along with the site URLs in my web application? There are thousands of site collections and subsites etc.
Thanks so much.

Apologies for formatting, reply on iPad sucks.... Use this example: http://iedaddy.com/2011/11/sharepoint-information-architecture-diagram-using-powershell-and-visio/ But in the powershell for the select, include the MasterURL property so it will write
it out to the .csv file as well. I assume you are just looking for what are your active master pages per site are....won't report if you've hard coded the values into individual pages as it is just querying site properties.
ieDaddy
Blog: http://iedaddy.com
Twit: @iedaddy

Similar Messages

  • How to set custom master page for social/sites.aspx in sharepoint 2013

    How to set custom master page for social/sites.aspx in sharepoint 2013.?
    File path is
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\SocialDataStore\SocialDataStoreList\sites.aspx
    Thanks in advance

    Hi,
    You could open the sites.aspx in Notepad or SharePoint designer, and set the master page to your own master page directly via editing:
    <%@ Page language="C#" MasterPageFile="~masterurl/custom.master"      Inherits="Microsoft.SharePoint.Portal.WebControls.FollowedContentWebPartPage,Microsoft.SharePoint.Portal,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
    %>
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to list all properties in the default Toolkit

    I would like to know what kinds of properties are stored in the default Toolkit (Toolkit.getDefaultToolkit()). I don't know how to list all of them. Toolkit class has a method getProperty(String key, String defaultValue), but without knowing a list of valid keys, this method is useless.
    Any idea would be appreciated.

    Here is a little utility that I wrote to display all the UIDefaults that are returned from UIManager.getDefaults(). Perhaps this is what you are looking for?
    import javax.swing.*;
    import java.util.*;
    public class DefaultsTable extends JTable {
        public static void main(String args[]) {
            JTable t = new DefaultsTable();
        public DefaultsTable() {
            super();
            setModel(new MyTableModel());
            JFrame jf = new JFrame("UI Defaults");
            jf.addWindowListener(new WindowCloser());
            jf.getContentPane().add(new JScrollPane(this));
            jf.pack();
            jf.show();
        class MyTableModel extends javax.swing.table.AbstractTableModel {
            UIDefaults uid;
            Vector keys;
            public MyTableModel() {
                uid = UIManager.getDefaults();
                keys = new Vector();
                for (Enumeration e=uid.keys() ; e.hasMoreElements(); ) {
                    Object o = e.nextElement();
                    if (o instanceof String) {
                        keys.add(o);
                Collections.sort(keys);
            public int getRowCount() {
                return keys.size();
            public int getColumnCount() {
                return 2;
            public String getColumnName(int column) {
                if (column == 0) {
                    return "KEY";
                } else {
                    return "VALUE";
            public Object getValueAt(int row, int column) {
                Object key = keys.get(row);
                if (column == 0) {
                    return key;
                } else {
                    return uid.get(key);
        class WindowCloser extends java.awt.event.WindowAdapter {
            public void windowClosing(java.awt.event.WindowEvent we) {
                System.exit(0);
    }

  • How to list all the rows from the table VBAK

    Friends ,
    How to list all the rows from the table VBAK.select query and the output list is appreciated.

    Hi,
    IF you want to select all the rows for VBAK-
    Write-
    Data:itab type table of VBAK,
           wa like line of itab.
    SELECT * FROM VBAK into table itab.
    Itab is the internal table with type VBAK.
    Loop at itab into wa.
    Write: wa-field1,
    endloop.

  • How to list all files in a given directory?

    How to list all the files in a given directory?

    A possible recursive algorithm for printing all the files in a directory and its subdirectories is:
    Print the name of the directory
    for each file in the directory:
    if the file is a directory:
    Print its contents recursively
    else
    Print the name of the file.
    Directory "games"
    blackbox
    Directory "CardGames"
    cribbage
    euchre
    tetris
    The Solution
    This program lists the contents of a directory specified by
    the user. The contents of subdirectories are also listed,
    up to any level of nesting. Indentation is used to show
    the level of nesting.
    The user is asked to type in a directory name.
    If the name entered by the user is not a directory, a
    message is printed and the program ends.
    import java.io.*;
    public class RecursiveDirectoryList {
    public static void main(String[] args) {
    String directoryName; // Directory name entered by the user.
    File directory; // File object referring to the directory.
    TextIO.put("Enter a directory name: ");
    directoryName = TextIO.getln().trim();
    directory = new File(directoryName);
    if (directory.isDirectory() == false) {
    // Program needs a directory name. Print an error message.
    if (directory.exists() == false)
    TextIO.putln("There is no such directory!");
    else
    TextIO.putln("That file is not a directory.");
    else {
    // List the contents of directory, with no indentation
    // at the top level.
    listContents( directory, "" );
    } // end main()
    static void listContents(File dir, String indent) {
    // A recursive subroutine that lists the contents of
    // the directory dir, including the contents of its
    // subdirectories to any level of nesting. It is assumed
    // that dir is in fact a directory. The indent parameter
    // is a string of blanks that is prepended to each item in
    // the listing. It grows in length with each increase in
    // the level of directory nesting.
    String[] files; // List of names of files in the directory.
    TextIO.putln(indent + "Directory \"" + dir.getName() + "\":");
    indent += " "; // Increase the indentation for listing the contents.
    files = dir.list();
    for (int i = 0; i < files.length; i++) {
    // If the file is a directory, list its contents
    // recursively. Otherwise, just print its name.
    File f = new File(dir, files);
    if (f.isDirectory())
    listContents(f, indent);
    else
    TextIO.putln(indent + files[i]);
    } // end listContents()
    } // end class RecursiveDirectoryList
    Cheers,
    Kosh!

  • Urgent: How to list all alias for a server throw DNS query?

    Hi
    Is there anyone know how to list all alias for a server by asking the network DNS. Is that possible?
    It doesn't work with InetAddress it return a single result.
    Best regard

    InetAddress will not get you the aliases, but you can certainly find all the different IP addresses for a specific host name using the getAllByName() method.
    You won't be able to get the aliases since those IP addresses (assuming there are more than 1) will all be cached as mapping to the name you passed to the getAllByName() method and you can't clear the map cache until the JVM exits.
    So your best hope is to get a list of IP's and either exit your app and restart with a new mode, or save them to a file for another app to read.

  • How to create a master page in Dreamweaver?

    Hi
    Does anyone know how to create a master page in Dreamweaver ??

    Dreamweaver Templates ~
    http://www.smartwebby.com/web_site_design/dreamweaver_template.asp#1
    Server-Side Includes ~
    http://www.smartwebby.com/web_site_design/server_side_includes.asp
    Spry Tabbed Panels ~
    http://labs.adobe.com/technologies/spry/samples/tabbedpanels/tabbed_panel_sample.htm
    Spry Accordion Panels ~
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • PowerShell script to list ALL documents bigger than 10MB - in list attachments/libraries all over my site?

    Hi there,
    Just wondering if someone can give me the PowerShell script to list ALL documents bigger than 10MB - in list attachments/libraries all over my site?
    Really appreciated.
    Thank you.

    Hello,
    here you can find sample to help you create yoru script :
    http://sharepointpromag.com/sharepoint/windows-powershell-scripts-sharepoint-info-files-pagesweb-parts
    see this sample extract from this site
    Get-SPWeb http://sharepoint/sites/training |
                                     Select -ExpandProperty Lists |
                                     Where { $_.GetType().Name -eq "SPDocumentLibrary" -and
                                             -not $_.Hidden }
    |
                                     Select -ExpandProperty Items |
                                     Where { $_.File.Length -gt 5000 } |
                                     Select Name, {$_.File.Length},
                                            @{Name="URL";
                                            Expression={$_.ParentList.ParentWeb.Url
    + "/" + $_.Url}}
    this can help too :
    https://gallery.technet.microsoft.com/office/Get-detail-report-of-all-b29ea8e2
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.
    Why mark as answer?

  • How make Adobe Muse Master page Template for BC

    How make Adobe Muse Master page Template for BC.?
    Thanks
    Ares

    Hi Brad,
    I notice doble brackets and also use normal page for converting it to BC template. Also I  have delete uploaded page from /dir as BC every time generating the same tamplate but with diferent name when I am publishing updated project from Muse.
    Ares

  • Sunone Messaging Server 6.1--How to list all mail user's last login time

    hi,i want to know how to list all the mail user's last login time.
    There are more than 100000 mailbox accounts on our mail server,
    i want to know which account is not used for more than 2 or 3 years.
    thanks.

    http://wikis.sun.com/display/CommSuite/imsconnutil
    Somchai.

  • Creating Master page for publishing site

    Hi,
    I am trying to create a master page for publishing site. I have downloaded the "StarterBranding - V1.3" from codeplex, and used the "Starter Publishing". Currently it is not showing logo, search box, top navigation, breadcrumbs.
    I have an existing master page which has lot of tags, and I am not sure what they represent. The below code is after the script manager tag in the body section:
    <SharePoint:AjaxDelta id="DeltaDelegateControls" runat="server">
    <SharePoint:DelegateControl ID="DelegateControl2" runat="server" ControlId="GlobalNavigation" />
    <SharePoint:DelegateControl ID="DelegateControl3" ControlId="GlobalSiteLink3" Scope="Farm" runat="server" Visible="false" />
    </SharePoint:AjaxDelta>
    <div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex">
    <a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="<%$Resources:wss,master_turnonaccessibility%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex">
    <a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral2" runat="server" text="<%$Resources:wss,master_turnoffaccessibility%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div class="s4-notdlg s4-skipribbonshortcut noindex">
    <a id="A1" href="javascript:;" onclick="document.getElementById('startNavigation').focus();" class="ms-accessible ms-acc-button" accesskey="<%$Resources:wss,skipribbon_accesskey%>" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral3" runat="server" text="<%$Resources:wss,skipRibbonCommandsLink%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div class="s4-notdlg noindex">
    <a id="A2" href="javascript:;" onclick="document.getElementById('mainContent').focus();" class="ms-accessible ms-acc-button" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral4" runat="server" text="<%$Resources:wss,mainContentLink%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div id="TurnOffAnimation" style="display:none;" class="s4-notdlg noindex">
    <a id="linkTurnOffAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral5" runat="server" text="<%$Resources:wss,master_disableanimation%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div id="TurnOnAnimation" style="display:none;" class="s4-notdlg noindex">
    <a id="linkTurnOnAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral6" runat="server" text="<%$Resources:wss,master_enableanimation%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <a id="HiddenAnchor" href="javascript:;" style="display:none;"></a>
    <div id="suiteBar" class="ms-dialogHidden noindex">
    <div id="suiteBarLeft">
    <div class="ms-table ms-fullWidth">
    <div class="ms-tableRow">
    <div class="ms-tableCell ms-verticalAlignMiddle">
    <SharePoint:DelegateControl id="ID_SuiteBarBrandingDelegate" ControlId="SuiteBarBrandingDelegate" runat="server"/>
    </div>
    <SharePoint:AjaxDelta runat="server" id="DeltaSuiteLinks" BlockElement="true" CssClass="ms-core-deltaSuiteLinks">
    <div id="suiteLinksBox">
    <SharePoint:DelegateControl id="ID_SuiteLinksDelegate" ControlId="SuiteLinksDelegate" runat="server" />
    </div>
    </SharePoint:AjaxDelta>
    </div>
    </div>
    </div>
    <div id="suiteBarRight">
    <SharePoint:AjaxDelta runat="server" id="DeltaSuiteBarRight" CssClass="ms-core-deltaSuiteBarRight" BlockElement="true">
    <div id="welcomeMenuBox">
    <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false" />
    </div>
    Are the above tags required in Master page? what is the use of it? I have more tags and will add after knowing the use of it in future threads.
    Thanks

    Hi,
    According to your description, my understanding is that you want to know about the each tags useful in master page.
    In SharePoint 2013 master page, there are some common tags like body tag, head tag and meta tag and some style CSS div tags. For the useful of these tags, I suggest you can refer the articles below:
    Understanding HTML master pages in SharePoint 2013
    In your custom master page, it will have some custom css tags depend on the display style but it is no required for master pages, if you want to know about what tags is required in master page, you can compare the custom master page with the  OOTB master
    page.
    More information:
    Create a minimal master page in SharePoint 2013
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Some users hitting error page when trying to access Web Applications...why?

    Hi,
    I have a SharePoint 2010 setup with 4 WFE, 4 APP Servers and 1 DB Server.
    After reading up a while back which services should be running on which server layer I remove the Web Application Service from APP Server (using Central Admin). The service is currently in error state on that machine. I had also removed a WFE Server which
    was not required and ensured all WFE had Web Application Service running as Microsoft Specified. I have checked each WFE and they have all same Web Applications in IIS. I have accessed a specific Web Application (that a user said they couldn't access) on 2
    of the 3 WFE servers when remoted into them, but one prompts me for login details. I have looked at the NLB on each WFE Server and saw that 2 out of three servers had all three servers in cluster. One that didn't was not same server as had problems accessing
    Web Application. I have removed a Server from Cluster and added it back as I saw Priorities were 1,2,4 (3 must have been initial removed server) and added it back again so Priorities were 1,2,3.
    Can anyone explain what may have happened in this scenario? It seems I think to be hitting this server with the problem accessing the Web Application. It seems to time out. How do I resolve this? DO I need to resync?
    Thanks.
    John.    

    Hi John,
    For your issue, it can be caused by that you remove  and  re-add a WFE from the NLB cluster. As  the Priority was changed, you need to disconnect and reconnect your SharePoint using SharePoint Products Configuration Wizard.
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • How to find if a ManagedMetadata is used in a web application in SharePoint 2010 programmatically

    Hi,
    Is there any way using SharePoint 2010 server object model that we can find out which managed metadata is used in any of the sites in web application.
    Regards, Shruti

    You can use the code below. You'll need to check all of the fields in each web, as well as each list, so you'll need to use it in a loop. Also, in my example, I'm just getting the first termset in the first term group in the first term store. You'd want
    to change that to the termset you need.
    using (var site = new SPSite("http://siteurl"))
    TaxonomySession s = new TaxonomySession(site);
    TermStore store = s.TermStores[0];
    Group group = store.Groups[0];
    TermSet termSet = group.TermSets[0];
    using (var web = site.RootWeb)
    var fields = web.Fields;
    foreach (SPField f in fields)
    if (f.FieldValueType == typeof (Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection) || f.FieldValueType == typeof (Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection))
    var tf = f as TaxonomyField;
    if (tf.TermSetId == termSet.Id)
    //do something
    var log = String.Format("Field {0} is a memeber of TermSet {1}", f.StaticName, termSet.Name);
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • How to upload pdf file in a canvas in flex web application?

    how to upload pdf file in a canvas in flex web application?

    Hey saif.antri,
    You can view PDFs and more using iBooks on your iPhone:
    iBooks: Viewing, syncing, saving, and printing PDFs on iPhone, iPad, and iPod touch
    http://support.apple.com/kb/HT4227
    Have a great day,
    Delgadoh

  • How to Copy FrameMaker Master Pages to all files in a book?

    Newbie question.
    I've created a Master page template for a title page that I now want to apply to every file in my collection of books (~5 books, +30 files).  How do I do this?
    The page has a full page image and different margins.
    I would try to brute force (manually recreate it in every file) but it is nearly a fluke that I managed to get it right to begin with.
    I see there is a way to import reference pages--what about master pages?
    Thanks!
    Katherine

    Katherine, are you wanting to import just a single master page (e.g. one called "Title"), but not the Left/Right default pages,  to all the other docs?
    that's difficult to do in FM's dialogs because (as you may have found already) you can't choose specific master page(s)  to import, it's an all-or-nothing import.
    Also, it helps us if you specify what version of FM, including the "pxxx" numbers as shown in Help > About, that always helps folks answer more precisely if there are variations among versions.
    Sheila

Maybe you are looking for

  • How to merge photos in photo booth

    how to merge photos in photo booth that they will be un one photo

  • H.323 slow start problem

    I work with Cisco AS5350XM GW , version 12.3 (12r)PI6b. I tried to make a call scenario with protocol H.323 only from TS trough Cisco gateway back to same TS. The call scenario with h.323 fast start was successful, but when I switched to slow start,

  • ITunes 11.x resetting itself every time its closed and relaunched

    Itunes 11.x keeps resetting itself every time I close it and then later reopen. It prompts accepting the end user agreement, then upon entering, all the sync preferences are reset. Doesn't seem to effect backup of apps or music library. I'm using win

  • New IOS7 & there is no attachment option

    Hi, When is the new software IOS7 update relese date... Is there any option to attach any file/documents to the forward email... i hope there is no such option in iphone (4s).. will this be available in IOS7 update?

  • Strange Screen Behaviour When Scrolling

    Hi, anyone seen this before? When users have scroll down in a panel, some display elements overlap each oher (see the two screenshots). By scrolling up and down a few times they can get their display back to normal. Saurabh Attachments: overlap.jpg (