How can we show a custom column to all libraries in the default view without creating that for all libraries everytime

Hi,
Any help?
Thanks
srabon

You can use powershell script below which loops through each libraries and sets view.You can modify the script to user it for single library as well.
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$siteURL = "<YOURSITEURL>"
$site = Get-SPSite($siteURL)
foreach($web in $site.AllWebs) {
foreach($list in $web.Lists) {
if($list.BaseType -eq "DocumentLibrary") {
// the variables `$web` and `$list` already reference the objects you need
//$site = New-Object Microsoft.SharePoint.SPSite($SiteURL) ;
//$web = $site.OpenWeb($SiteURL);
// new instance of the list is necessary to avoid the error "Collection was modified"
$newList = $web.Lists.item($list.ID);
$viewfields = New-Object System.Collections.Specialized.StringCollection
$viewfields.Add("DocIcon")
$viewfields.Add("LinkFilename")
$viewfields.Add("_UIVersionString")
$viewfields.Add("FileSizeDisplay")
$viewfields.Add("Created")
$viewfields.Add("Modified")
$viewfields.Add("Editor")
[void]$newList.Views.Add(<VIEWNAME>, $viewfields, "", 100, $true, $true)
$newList.Update();
// setting the default view
$view=$newList.Views["<VIEWNAME>"]
$view.DefaultView = $true
$view.Update()
$web.Dispose();
$site.Dispose();
Ref: http://stackoverflow.com/questions/10015311/part2-sharepoint-2010-powershell-loop-through-all-document-libraries-creat
Hope that helps!
Avni Bhatt

Similar Messages

  • Hi, I upgraded from iOS 5.1.1, to iOS 6, and it's ridiculously slow, I can't sync to my computer, (manually manage music), and all of my photos were gone. How can I get my photos back? It says restoring photos, but it's said that for two days now!

    Hi, I upgraded from iOS 5.1.1, to iOS 6, and it's ridiculously slow, I can't sync to my computer, (manually manage music), and all of my photos were gone. How can I get my photos back? It says restoring photos, but it's said that for two days now!

    It just does't sync. I connect it to itunes, but nothing happens. Where it says how much space I have, it's just on ebig bar that says other. I can play my music on itunes, but not when i unplug it.
    All of my photos were gone, i took and saved them with my ipod.
    The photo app is saying restoring.
    What should i do?

  • How can I continue text into column on next page in the new Pages?

    In the previous version of Pages if your text exceeded the length of the column, there was a little icon to the right of the column where you could click to have the remaining text continue to another column on another page. I don't see any option to continue the text once you've run out of space. How can this be done in the new verio
    Message was edited by: JoyRose

    Feature removed in Pages 5 along with over 90 others.
    Peter

  • How can you add your own print and export buttons to the CR viewer toolbar?

    I posted a previous question that was asking how to get around the Information Bar in IE7 when you export and print.  Unfortunately the CR viewer file download code gets blocked by IE7 because the buttons don't directly download the file.  However, I have been able to get a regular button that calls the following code and streams the file to the client and IE7 does not block it. 
    Sub PrintPDF(sender As Object, e As System.EventArgs)
         Dim crReportDocument as ReportDocument
         Dim crExportOptions as ExportOptions
         Dim crDiskFileDestinationOptions as DiskFileDestinationOptions
         Dim Fname as string
         CrReportDocument = New ReportDocument()
         CrReportDocument.Load(Server.MapPath("estactionlist.rpt"))
         Fname = Server.MapPath("./") & Session.SessionID.ToString & ".pdf"
         CrDiskFileDestinationOptions = New DiskFileDestinationOptions()
         CrDiskFileDestinationOptions.DiskFileName = FName
         CrExportOptions = crReportDocument.ExportOptions
         With crExportOptions
              .DestinationOptions = CrDiskFileDestinationOptions
              .ExportDestinationType = ExportDestinationType.DiskFile
              .ExportFormatType = ExportFormatType.PortableDocFormat
         End With
         CrReportDocument.Export()
         Response.ClearContent()
         Response.ClearHeaders()
                    Response.AddHeader("content-disposition", "attachment;filename=test.pdf")
                    Response.ContentType = "application/pdf"
                    Response.Charset = ""
                    Response.WriteFile(Fname)
                    Response.Flush()
         Response.Close()
         System.IO.File.Delete(Fname)
    End Sub
    So here are my questions?
    1. Is it possible to add a custom print control/icon to the CR viewer toolbar?
    2. If one is not possible, then is it possible to override the CR viewer print and export buttons with your own subroutines like the one above?
    I just want my page to look nice and hate to have print and export buttons outside of my CR viewer. 
    Thanks,
    Kevin

    It might be possible to replace the buttons in a windows app since you can retrieve the toolbar as a toolbar object in the winform viewer  ( ToolStrip toolBar = (ToolStrip) crystalReportViewer1.Controls[3]; )  however with a web app, it's a lot more difficult.
    The problem is that that you need to parse the Request string to try and figure out if the print / export button was clicked.  The code below makes the print button disappear if you click it, so you should be able to modify it to call your custom printing / exporting code instead  (You have to do this check in a postback)
            Dim I As Integer = 0
            If Request.Form.AllKeys.Length > 0 Then
                For I = 0 To Request.Form.AllKeys.Length - 1
                    Response.Write(Request.Form.Keys(I).ToString & "<BR>")
                    If Request.Form.Keys(I).ToString = "CrystalReportViewer2:_ctl2:_ctl2.x" Then
                        CrystalReportViewer2.HasPrintButton = False
                    End If
                Next
           End If
    Shawn

  • How can I have two devices with separate iTunes accounts on the same computer without sharing libraries?

    I have an iPhone 3s and my sister has an iPhone 3.  We use them only as iPods.  We each have our own iTunes account, but we have to share a computer.  How can we both syn our devices without sharing our music and app libraries?

    The most reliable way would be to set up individual user accounts in WIndows. Then each of your iTunes libraries will be completely separate.
    Regards.

  • How can I build this cluster? I don't like the one I have created (too big)

    Hi everybody, I'm working with a Vision VI and the trouble is that I need to create a cluster to connect it to a terminal called Settings of the Vision VI (IMAQ Count objects). These settings includes booleans, long and unsigned word type values. I've seen this one in a pdf document:
    I like how it looks because it's in a reduced space.
    This is the one I've created:
    (Please ignore the red numbers 1 and 2)
    And the block diagram looks like this:
    If someone knows how make a VI as the first image, please post it.
    Thank you so much for your answers and comments.
    P.S. I use LabView 2009, maybe some features are not availables in newers versions.
    Impossible is nothing
    Solved!
    Go to Solution.

    You did not create a cluster, just some individual controls that you are bundling in the code. that's not the same!
    I would recommend a combination approach from what we heard so far.
    First, create a control on the subVI input. Now we know it has the correct type.
    Right-click each control you don't like and replace it with one from a different palette (modern, classic, system), making sure you keep the same datatype. Keep the wire connected to the subVI. If the wire breaks, you picked a wrong datatype. simply undo and try again. (This way, the cluster order should not change).
    Now rearrange the controls the way you want.
    Here's are two quick examples I just made from scratch.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Settings.PNG ‏17 KB

  • How can i show single photos,not diaporama on TV with the AV component cable (without Apple TV)

    Hi everyone    
    I've got an Ipad 2 and the Apple AV component cable.
    I would like to show on tv only the photo which is on my ipad, but the only way i have is to start a diaporama with all my photos
    How should i do to show only the one I am on the ipad
    Thanks all

    @Chris:
    I was just referring to the visual graphics (you know, the fireworks, stars and other stuff that reminds me of the 70's....) that you can play on the screen when iTunes is playing music?
    I noticed that these effects are not just randomly chosen, they are in fact synchronized to the beat and intensity
    of the music, and that struck me as rather cool......

  • How can I show bookmarks in firefox at all times?

    I would like to see my bookmarks when I'm surfing the net. Now I have to open them again and again and again.

    You can toggle the Bookmarks sidebar on/off via "View > Sidebar > Bookmarks" or Ctrl+B (Cmd+B on Mac)
    You can check for problems with the localstore.rdf file.
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • How can a video editor use an NTSC studio monitor on the new iMac without a Firewire 400 port?

    Looking at the new iMacs (hungrily) and wondering how I will be able to continue using my Sony DSR-11 and NTSC monitor in the absence of any Firewire 400 port.  I suppose there may be cables that will allow me to use the Firewire 800 port and am thinking they may be difficult to locate.

    No they're not - they're available from many sources; i.e. I bought a FW 400 > 800 cable when I bought my iMac last August (at an authorized local reseller). Just google Firewire 400 > 800 and you'll get plenty of results. You can also opt for an adapter if you prefer. Both are also available at the Apple store online.

  • How can I restore a document/file to my iPad from the iCloud backup without restoring the whole device from the iCloud backup?

    My iPad has a number of documents, including pdf, xls, doc, ppt files.  Some are associated with Documents to Go - Premium, which froze on the device attempting to download an update and had to be deleted (which also deleted the files that only were on the iPad and associated witht the app).  How do I restore only that app and/or the related files from the iCloud.  Ans I've found so far were not clear/specific enough or seemed to indicate the entire iPad had to be restored.  iOS 5.1.1

    Step by step
    1. Erase all contents and settings
    2. You'll be asked twice to confirm
    3. You'll see Apple logo and progress bar
    4. You'll see a big iPad logo on screen
    5. Configuration start
    6. Set language
    7. Set country
    8. Enable Location Service
    9. Select network, enter password and join network
    10. You'll be given 3 options (a) Setup as New iPad (b) Restore from iCloud Backup (c) Restore from iTune Backup
    11. Selected Restore from iCloud Backup
    12. You'll be required to enter Apple ID and Password
    13. Agree to Terms and Conditions
    14. Select Backup file
    15. You'll see progress bar
    16. Red slider will appear; slide to unlock; step #1 to #16 is fast
    17. Pre-installed apps will be restored first
    18. Message: Purchased apps and media will now be automatically downloaded
    19. You'll see a pageful of apps with Waiting/Loading/Installing
    20. Message: Some apps cannot be downloaded, please sync with computer

  • How can I have a waveform graph (or chart) updated using the value propertynode without loosing previous data plots?

    I want to have a master waveform graph (or chart) capable of displaying data via the value property node. There are several value nodes in a flat sequence structure. The problem is that the graph (or chart) doest keep the previous data and does display just the very last value property node. Can anybody help me? 

    A graph does not "keep" any data. It is strictly an indicator which displays the most recent values written to it. 
    A chart has an internal buffer, called, Chart History which retains previously written data until the buffer is full. Then it removes the oldest data when new data is sent to the chart.
    1. Sequence structures are almost never needed in good LabVIEW programs. They defeat dataflow and limit parallelism.
    2. Value property nodes (and local variables) should only be used under special circumstances and a sequence structure is not one of those.
    A state machine with shift registers or a Producer/Consumer architecture are more likely to be better ways of doing what you are trying to do and can be implemented without sequence structures or Value property nodes.
    Lynn

  • How can I setup my MacBook Pro, iMac and MacBook Air the same way without doing each separately? Same home page in Safari, same search preferences, etc

    Everytime I buy a new device or whipe out a hard drive and do a fresh install, I have to reset everything. All my preferances, Safari Homepage, passwords, etc.
    I know about time machine. The problem is that sometimes, I am trying to avoid a problem that is in the Time Machine's backup.
    I spend a lot of time setting my preferences for all the software I use. It is a real pain to modify every toolbar, etc

    One thing you can try next time is Setup Migration. So, after downloading and reinstalling OS X and after the restart into Setup use Setup Migration to migrate your user account(s), settings, apps and data from a Time Machine back up.

  • How can i get adobe off my mac and make preview the default PFD viewer?

    that.

    Trash the adobe app (not necessary, but satisfying),
    trash any adobe pdf plugin in either Home/Library/Internet Plug-Ins/ or HD/Library/Internet Plug-Ins/
    restart any browsers, & you should have built-in pdf support within Safari, just as before adobe reader or acrobat was installed.

  • How to have SharePoint search custom columns in a custom list?

    Hello,
    How can have SharePoint search custom columns in a custom list?  I have a custom list for a directory with names, department, title and phone numbers.  Department and titles are not searchable with the search box for the list.
    How can I make these 2 custom columns searchable?
    Thanks
    Paul

    Any text added to any property is searchable. If you have a Sales department search for "sales", but I think you are asking about doing a property search like "department=sales" or "department:sales".
    2013 has a different way than 2007 and 2010 to create Managed Properties. You will need to create a Site Column and then a little configuration. The basic steps are:
    Create a Site Column (as SP already has a Department column you will want to create one with a difference name such as CorpDept.)
    Add the column to a list or library and add data. (won't be found otherwise)
    Wait for the next content crawl. (or manually start a crawl)
    Go to the tier where you want to define the managed property and go to the Schema page:
    Central Admin, Search Service, Schema
    your site, Settings (gear), Site Settings, Search Schema (in the Site Collection Admin section)
    your site, Settings (gear), Site Settings, Schema (in the Search section)
    Click Managed Properties and search for your column name. It might look like this: ows_q_TEXT_CorpDept.
    Edit the Managed Property and give it a useful Alias, such as "CorpDept".
    Test the search:    CorpDept:Sales
    Do a web search for "SharePoint 2013 Site Column Managed Properties" for examples.
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • I have just downloaded an alternative keyboard (Fast Keyboard)How do I get my Ipad2 to use it instead of the default keyboard, please?

    I have just downloaded an alternative keyboard (Fast Keyboard).
    How do I get my Ipad2 to use it instead of the default keyboard, please?
    Thanks for your help

    First, please don't shout.
    Second, don't post personal information.
    Third, restore, if iTunes will let you.  Everything except the password will be restored.  Connect via cable to the computer that you use for sync.  Be forewarned that it takes a long time.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.

Maybe you are looking for

  • Formula for Cross-Tab Column

    Hi I am struggling with a particular issue related to cross-tab and I tried a lot, but couldn't managed to get the solution. Please help with this issue , it would be of great help to me. Thanks Aniket [CrossTab problem|http://www.forumtopics.com/bus

  • Good way to convert list BigDecimal to list Double

    is there an better way then iterate over all elements and convert each element to convert a hole list? probably somthing like the conversion List.toArray(Type[])? in my special cas the list are list<list<double>> and list<list<bigdecimal>>. Edited by

  • Form display based on Goods movement status

    Hi all, Delivery note should be printed only when VBUK-WBSTK (Total Goods movement status) is equal to C (Completely processed). Can this be done in a Smartform? If so how?

  • Can it be taken apart?

    Hi everyone! My Airport Express has an issue... the last time I had a set of RCA cables going from the phono jack to my stereo, the end of the phono plug broke off inside of the jack on the airport express and now I can't use my airtunes because the

  • How to move a document to a particular document library after workflow review and approval

    Hello , I want to do a work flow for a document review and its approval, if the document is approved then it should be moved to a document library called "Approved Documents". I have done following steps but don't know how to move the document to ano