Example to see all site collections in a specific content DB in sharepoint 2010

Can someone give an example to see all site collections in a specific content DB
in SharePoint 2010.
I've tried the below ones but it gives all content DB's with all site collections.
Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}}
Appreciate your help

Use Get-SPSite cmdlet
$spAssgn = Start-SPAssignment;
Get-SPSite -ContentDatabase "<SPContentDBName>" -Limit ALL -AssignmentCollection $spAssgn|Select Title,Url;
Stop-SPAssignment $spAssgn;
Get-SPSite
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

Similar Messages

  • Cross Site collections navigation with publishing feature enabled into sharepoint 2010??

    Hi,
    Is it possible to cross site collection navigation in share point 2010 with publishing feature enabled? Right now we have a site collection with all the departmental sites within it. We are trying to create separate site collection with separate content
    database for each department for better management. But problem with Global navigation as OOB does not provide cross site collection navigation functionality, So looking for multiple site collections or navigation for more than one site collection under single
    umbrella. i was able to get the cross site collection navigation in my development env without publishing feature enabled using below link. But problem with production environment, as all the site collections and sites are publishing feature enabled. how i
    am gonna do cross site navigation with publishing feature enabled? 
    http://www.itsolutionbraindumps.com/2011/10/sharepoint-2010-cross-site-collection.html
    Any link or suggest will be greatly appreciated !

    Hi,
    According to your description, my understanding is that you want to create cross site collections navigation with publishing feature enabled in SharePoint 2010.
    Publishing sites (sites with publishing infrastructure) have their own navigation API, and it is much more complicated task to preserve cross-publishing sites navigation.
    We need to implement our own custom navigation provider.
    Please refer to the link below about the cross site collections navigation with publishing feature enabled:
    http://sadomovalex.blogspot.com/2010/12/cross-site-and-cross-site-collection.html
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • How to display all site collections to users for site access

    Currently when our users clients/internal log in, they are directed to a site directory.  The site directory only displays sites that the users have access too.  Which is great because I don't want our clients to see our entire client list.  
    Currently we have one site collection with 700+ sites.  
    We are changing the architecture of our SharePoint environment to create a new site collection for each client.  So, we may have 700+ site collections in one web application.  
    My question is, how can I display all site collections to our user for access, similar to a site directory?  
    Any help would be greatly appreciated.  
    Thanks,

    This is not possible OOTB. your requirement is get the list of all site collections on root site then security trim( which means user can see only the sites where they have permission.)
    I think this required alot of effort(developing a solutions and checking the permission on all sites). Issue is you have more than 700 sites collections and tons of user for each site collections and also 700+ clients.
    May be think about creating a list and fill that with all site collections(using script). then trim configure the item level permission( but lot of work).
    if you have user profile services then may be check about the memberships feature. 
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Powershell script to get Audit log settings for all site collections.

    Hi all,
    I am facing issue to get audit log details for all site collection across the farm with the below script. Could someone help me change the script.
    Function AuditValue($url)
    $site=Get-SPSite $url
    auditMask = $site.audit.auditflag
    return auditMask
    Get-SPSite -Limit All | Get-SPWeb -Limit All |
    Select Title,Url,AuditValue(Url)| export-csv "D:\scripts\Test\AuditDetails.csv" -notypeinformagettion
    Thanks Basva

    What errors are you getting? That is if any.
    Scrap that I see a few.
    Not had time to fix it fully. As I am now done at work, but this will help you on your way. It gets back only the audit flag value at the moment.
    Function AuditValue
    $site = Get-SPWeb "http://server" -limit ALL
    foreach($i in $site)
    $auditMask = $site.audit
    $list = $auditMask
    $list | Select-object auditflags
    AuditValue | out-file "C:\temp\AuditDetails.csv"
    EDIT::
    Function AuditValue
    $site = Get-SPWeb "http://SERVER" -limit ALL
    foreach($i in $site)
    $auditMask = $site.audit
    $list = $auditMask
    $list | Select-object @{Name="URL"; Expression ={$site.url}}, auditflags
    AuditValue | out-file "C:\temp\AuditDetails.csv"
    The above will also put URL 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • Usage Reports in all Site collections

    Hi all,
    We are using Sharepoint 2013 Server and we want to use Usage reports, but my question is, is it possible to obtain the usage reports of all site collections with one button?
    We don't want to go trough each site collection and run the site collection reports to see the statistics.
    Anyone knows about a third party application that does the work?
    Thanks,

    albandrod
    Unfortunately, Usage Reporting capabilities in SharePoint 2013 have been greatly reduced and I suspect they will be further reduced in coming versions.  Here are some third-party approaches in varying levels of complexity:
    Google analytics
    HarePoint
    DocAve Analytics for SharePoint
    Webtrends
    More can be found: search under "web Analytics." You may also want to have a look at a free solution:
    The SharePoint Flavored Weblog Reader(SFWR) v1.4
    This solution is something I am currently planning to implement for my customer's farm

  • Granting users Site admin to All site collections and/or Adding an o365 group by email to site admin group on all Site collections

    We will have 1000s of site collections.
    Why doesn't SharePoint Online 2013 offer a way to grant a user or a group Site admin rights to all site collections?
    And.. if we must add the user to every single site, can this be done by an o365 or ADFS group using it's email?
    We'd like to run this script to add a group to site collection admin on all sites, but Groups can't be referenced by an email?
    Get-SPOSite|foreach{Set-SPOUser -Site $_.Url -LoginName [email protected] -IsSiteCollectionAdmin $True}
    produces an error.  And if we try to add the group by email manually through the UI it can't find it either.   We've tried this with o365 groups and  ADFS groups.
    Any way to reference these groups from PowerShell?
    Is this limitation there for a reason? 

    bump.. anybody?

  • Access denied for all (most?) users in all site collections of web app

    Hi,
    I have a Sharepoint 2010 farm pre-SP1 (yes should be updated!) and for all site collections of a web app, all users are getting access denied.
    Now in my title I said "most?" because I have found one user in another office who does not have this issue. This web app/site collections also do not go through f5 or any proxies.
    Even if I add myself as a site collection admin via central admin, I get the same result. I've looked at everything, windows time on the server (not using kerberos), errors in event log (nothing), uls logs just say access denied (very helpful!), etc...
    I can try what's suggested at http://social.technet.microsoft.com/Forums/en-US/e66f1b09-605d-4546-a581-2a9283c238c0/access-denied-for-all-users-and-for-site-collections-owner?forum=sharepointgeneralprevious but when asking colleagues, there's been no
    changes, let alone with those accounts? I can do a get on the property tomorrow to find if there is a value set first, however.
    Any suggestions on this?

    Hi,
    Please try logging in the site with farm account.
    If it works, please make sure you have superuser and superreader accounts in CA > Application management > web application policy. If not, please add both accounts with the powershell script in the article below, this can cause all users denied when
    access the site:
    http://technet.microsoft.com/en-us/library/ff758656.aspx
    Here is a similar thread:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/a49b1ab8-273f-41e4-a0b8-be0e31c6733b/all-users-including-site-collection-admins-receiving-access-denied-from-one-site-collection?forum=sharepointadminprevious
    Regards,
    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] .
    Rebecca Tu
    TechNet Community Support

  • Changing site collections logos across all site collections

    HI All,
    I need to change the logo across all site collections, which are around 300-400, so don't intend to do this manually.
    My question is, will simply replacing the current logo in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE....
    with the logo I want to change to, and naming it exactly the same as the current logo, not achieve this?
    I have searched online and people run PS to achieve this, but in my head the above seems to be work, please correct me?
    Thanks

    I completely agree with Alex and not suggest to touch/change root folder. Initially it might looks easy but it may create issue.
    My option is to BRAND the sites. Master page branding is not a new concept and it mainly use for unanimous look and feel
    Look at below links which will help you to explore about branding
    SharePoint Branding 101:
    Branding Master Pages
    SITE LOGO AND CUSTOM SHAREPOINT MASTER PAGE
    https://www.youtube.com/watch?v=BX4yJA95FUU
    Hope it will help
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Restrict a user to see All site content link on quick lanuch

    Hi
    how to restrict a user (who has only view permissions ) to see All Site Content Link on quick lanuch
    adil

    You can find your answer in the following thread. You will have to rely on Audience targeting. 
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2b61ae45-77ca-4e80-88dd-98eed32d23b8/sharepoint-2010-hide-some-quick-launch-links-on-some-groups?forum=sharepointdevelopmentprevious
    Given its a long thread I have copied Hemendra's reply below which I think is what you should be doing.
    Go to site settings-->navigation-->click shared documents and click edit from menu.-->Now see the audience section and put users/group there who can view it.
    Here is how to add a new Audience
    http://technet.microsoft.com/en-us/library/cc262169(v=office.14).aspx
    Amit

  • SP2010 I need to set the include in search option switch on all document libraries to off across all site collections on the whole farm?

    SP2010 I need to set the include in search option switch on all document libraries to off across all site collections on the whole farm?
    Has anybody seen If this can be done programmatically any help would be gratefully welcomed thanks.

    i am not sure about the script, why not create crawl rule which will exclude the allitems.aspx from showing in the search results.
    Go to search service application, crawling section, click crawl rules to create a crawl rule to excludehttp://*allitems.aspx page.
    also check this:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/f431dd0e-871b-4f9e-990e-8f3b7ca932a4/crawl-rule-exclusion-sharepoint-2013
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Site collection in a particular content database

    How can we make sure to create a site collection in a particular content database?
    Arun Prakash

    Hi Arun, 
    There is no direct option from SharePoint UI to select content database while creating Site collection, However you can do that using power shell .. here is the code..
    $url = "http://test/sites/Communities"
    $ContentDatabase = "OSCommunities_Content"
    $WebsiteName = "Communities"
    $WebsiteDesc = "Communities site"
    $Template = "STS#1"
    $PrimaryLogin = "domain\abg-spprodadmin"
    $PrimaryDisplay = "admin"
    $PrimaryEmail = "[email protected]"
    New-SPSite -Url $url –ContentDatabase $ContentDatabase -Name $WebsiteName –Description $WebsiteDesc -Template $Template -OwnerAlias $PrimaryLogin –OwnerEmail $PrimaryEmail

  • Custom master pages don't appear in all site collections within same App

    I created an additional site collection within an existing application which has a preexisting site collection.
    The preexisting site collection uses a custom master page:
    .../_Layouts/ChangeSiteMasterPage.aspx
    that doesn't appear in
    .../newsite/_Layouts/ChangeSiteMasterPage.aspx
    Anything I need to do in
    .../_catalogs/masterpage/forms/allitems.aspx
    to apply the masterpage to the new site?
    <label for="ctl00_PlaceHolderMain_ctl00_ctl00_resetSubSitesCheckBox">Thanks,</label>
    Scott<label for="ctl00_PlaceHolderMain_ctl00_ctl00_resetSubSitesCheckBox"></label>

    Hey,
    I don't get the problem completely. I undestand that your custom masterpage, which you created once for an existing site collection, does not appear in a newly created site collection. So what where your deployment steps for the custom masterpage?
    Generally you would create the masterpage via Visual Studio and deploy it within a feature to the catalogs library, either in web-scope or in site-scope. A feature event receiver applys the masterpage to the current website (in web-scope) or to all webs
    in the site collection (in site-scope) on feature activating. But in both scopes you need to active the feature in every site collection (or website).
    So please tell us how you deployed the masterpage.

  • "This Site" searches all site collections

    Hi
    I've created a new web application and site collection (http://newSite)
    I created a second site collection (http://newSite/sites/newsite)
    For some reason when i do a search on the standard home page of
    http://newSite and select "This site: newSite" (the only option in the dropdown list) sharepoint also returns results for the second child dite collection (http://newSite/sites/newsite).
    Any ideas why?
    Another question: I have also create a new scope. How do i get the new scope to display in the default dropdown list?
    many thanks for your response.

    I'm not sure why you are seeing results from the other site collection.  However for your dropdown list issue.  You just need to go to your Site Collection settings -> Search Settings and check the use custom scopes box and provide the path
    to your search center.  It will then display whatever scopes are in the scope display group named Search Dropdown.  You can modify this by clicking on the Search Scopes link and then add your custom scope to that display group.Corey Roth blog: www.dotnetmafia.com twitter:
    @coreyroth

  • Allow users to search on all site collections, no matter where they are browsing

    SharePoint 2010, Enterprise Edition.
    I need to allow users to use the search box to search on all existing site collections, no matter what site they are. Currently, users are only allowed to search on the current site and on sites that are below the current one. Is it possible to search "everywhere"?
    Creating a Search Center would be a possible approach for this? Thanks.

    Yes, I would suggest creating an Enterprise search center and adding that to the navigation. Then you can go to the site settings to configure the site to use that search center.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • User missing from all site collections but present in User Profile (Central Admin)

    I have a user who does not show up in "People and Groups" (or if I search for this user) in any of the site collections but does show up when I look up his user profile on Central Admin. I've tried to add this user to the site collection using
    the following command, but I get an error: " The specified user domain\accountname could not be found."
    Get-SPWeb 'http://site' | New-SPUser -UserAlias 'domain\accountname'
    Idk if this is related, but on this user's profile, "Personal Site" field shows up as "SPSSITEERROR".
    Any help would be greatly appreciated.
    Thanks.

    Hi,
    I recommend to check if the user exists in Active Directory firstly.
    If yes, then the error will occur. And for the user profile of the user, it may due to the user profiles have not been synced with Active Directory yet.
    That "Personal Site" field shows up as "SPSSITEERROR" means that the MySite of that user has not been created successfully.
    I recommend to run User Profile Synchronization timer job and then check the results.
    Thanks,
    Victoria
    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]
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • Help needed to record an experiment for a running process

    Hi Team, While trying to record an experiment through Profile Running process option, we found issues in generating an experiment file.The error stated that the directory wasn't writable but we made sure all the permissions are available for the fold

  • Phone requesting to be restored but can't unlock!

    My phone lost coverege became stuck on the apple icon screen, then a few hrs later requested that it be restored and attached to iTunes in order to do this.BUT.... my laptop can't communicate with it as it tells me that the phone is locked by a pin c

  • I have an itunes card but it says I have to redeem in the New Zealand store front

    Please help,,

  • Downloads and interference

    Why is it that when I responded to a Microsoft upgrade to 8.1 all my system went into meltdown, my passwords were all ......up and then a few days later microsoft blocked my Skype system with a switch request for a new password to Skype which I could

  • Brocade FCX PoE with Cisco LAP

    Hi, We are using Brocade FCX PoE switches with AIR-LAP1142N-N-K9 and AIR-LAP1252AG-A-K9. We have some issues that may or may not be due to the Brocade-LAP links but would like a reality check with other Brocade sites. If you are successfully using Br