Listing out sites under SiteCollection Sharepoint Online

Hi
 Is there a way to count total number of sites under siteCollection using powershell script for Sharepoint Online?
i expect something like total number of SiteCollection,s total number of sites

See if the following link offers you any help
http://www.sharepointnutsandbolts.com/2013/12/Using-CSOM-in-PowerShell-scripts-with-Office365.html
http://www.sharepointnutsandbolts.com/2013/12/SharePoint-Online-and-MSOL-WAAD-PowerShell-Office365.html
Geetanjali Arora | My blogs |

Similar Messages

  • Building Site Collections in SharePoint Online

    Hello all,
    Please forgive me for this very basic question, but I was not able to find the info online. 
    Background info: I have a great deal of experience with SharePoint administration on-prem but not much experience with SharePoint Online. My current organization has O365 and wants to build a collaboration environment and an Intranet. I understand the information
    architecture practices that would have been common for this for an on-prem environment, and I understand that those have changed with 2013 and SharePoint Online due to the new practice of organizing everything under one web app. 
    Between reading some articles and using my experience with on-prem, I am trying to design an organized information architecture that will facilitate both environments and the permissions structures they require. My tentative plan was to build one site collection
    for the Intranet under https://mycompany.sharepoint.com/sites (under which subsites would be built for various Intranet divisions), and then a number of individual site collections for the collaboration environment under https://mycompany.sharepoint.com/teams
    (/hr, /finance, etc., so that content owners and users could work in their own site collection without affecting a site collection belonging to someone else). 
    This is the article that initially caused me to believe that this is possible/a good idea: http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2014/09/01/sharepoint-online-information-architecture-considerations.aspx. 
    "For [managed paths] you get the root, /search (explicit managed path), /sites (wildcard managed path), and /teams (wildcard managed path)."
    However this article leads me to believe that I will not be allowed to create any site collections at all, only subsites: https://support.office.com/en-us/article/Plan-sites-and-manage-users-8e568d8d-3d65-42c4-99fa-f7285c9db842. 
    "You cannot create additional site collections in SharePoint Online for Office 365 for Small Business."
    I understand the answer to this may depend on what version of O365 we have, and I am working to find that out. 
    My understanding is that I cannot be made a SharePoint Online administrator without being a global O365 administrator: http://blogs.technet.com/b/lystavlen/archive/2012/06/14/understanding-the-administrator-role-in-sharepoint-online.aspx.
    "You cannot separate the roles of Office 365 global administrator and SharePoint Online Administrator." 
    Thus, I don't currently have the level of access I need to browse around the administration area and find the answers to my questions that way. When the time comes, I will likely be given temporary access or will be working with an O365 global administrator
    to build.
    Main question: Will I be allowed to build site collections under managed paths?
    Larger question: How are others managing the information architecture for an Intranet and a Collaboration environment in SharePoint Online, especially if the answer to the prior question is no?
    Thanks in advance for any insight you can offer. 
    Shae

    Hi,
    According to the error message, the Microsoft.Online.SharePoint.Client.Tenant.dll seems not been loaded.
    You can find it in the path below:
    C:\Program Files\SharePoint Client Components\Assemblies
    A code snippet about how to retrieve a list of site collections in a tenant for your reference:
    const string username = "[email protected]";
    const string password = "password";
    const string tenantAdminUrl = "https://yourdomain-admin.sharepoint.com/";
    var securedPassword = new SecureString();
    foreach (var c in password.ToCharArray()) securedPassword.AppendChar(c);
    var credentials = new SharePointOnlineCredentials(username, securedPassword);
    using (var context = new ClientContext(tenantAdminUrl))
    context.Credentials = credentials;
    var tenant = new Tenant(context);
    SPOSitePropertiesEnumerable spp = tenant.GetSiteProperties(0, true);
    context.Load(spp);
    context.ExecuteQuery();
    foreach (SiteProperties sp in spp)
    Console.WriteLine(sp.Title);
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Migrating on premise site collections to SharePoint online using powershell

    Hi folks,
    Intention:-migrating on premise site collection to SharePoint online.
    Is there any power-shell script or list availabe products.
    Please give idea and let me know that script.
    Thanks,

    Hi Jio333,
    This issue has been discussed in Sharepoint forum:
    SharePoint 2013 - Migrate
    from SharePoint 2013 On Premise to SharePoint 2013 Cloud      
    To complete this kind of Migration task, we usually use 3rd party tools because they have some complex migration requirements.
    If there is anything else regarding this issue, please feel free to post back.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community 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 Support, contact [email protected]

  • Backup - Restore process of a Site Collection in SharePoint Online

    Hi, I have a couple of questions. 
    1) What do I have to do to get a backup-restore of a site collection in SharePoint Online? 
    2) Can I myself perform a backup-restore or just backup a site collection without using any 3rd party tool?
    Any inputs on these will be helpful. Thanks in advance!

    Hi,
    what you can instead of backup and restore site is to save it as template, check this thread
    http://community.office365.com/en-us/f/154/t/203139.aspx
    Kind Regards,
    John Naguib
    Technical Consultant/Architect
    MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation
    Please remember to mark your question as answered if this solves your problem

  • Using microsoft.sharepoint.client.search.analytics to report the monthly hit count of site collections on SharePoint Online

    Is it possible to use microsoft.sharepoint.client.search.analytics to report the monthly hit count of site collections on SharePoint Online.
    GetHitCountForDay()
    GetHitCountForMonth()
    If yes, how can this be called and executed successfully from a Console application using the Client Object Model.
    Reference:
    http://download.microsoft.com/download/8/5/8/858F2155-D48D-4C68-9205-29460FD7698F/[MS-SPACSOM].pdf
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/54310f5f-e8a3-469e-86a3-63781b91670d/how-to-get-analytics-reports-programmatically-in-sharepoint-2013?forum=sharepointdevelopment

    Check if this works in 2013 as well.
    http://blogs.technet.com/b/sharepointdevelopersupport/archive/2012/10/04/how-to-retrieve-web-analytics-report-data-using-api.aspx
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Authoring and Publishing site collection in SharePoint Online

    Hi ,
    Can we have multiple authoring and publishing site collection in SharePoint Online?
    Thanks, Kaviya (Please remember to click “Mark as Answer” on the post that helps you)

    Yes you can use SharePoint 2013 cross-site publishing feature in SharePoint Online to support 1:1 and 1:n set up of authoring : publishing site-collections in SharePoint Online. The catch is that it all needs to be within same tenant.
    http://technet.microsoft.com/en-us/library/jj635883(v=office.15).aspx
    http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2013/04/01/cross-site-publishing-alternatives-in-sharepoint-online-office-365.aspx
    Please mark the replies as answers if they help or unmark if not.

  • Is there any REST API to get all the Site and site Collections from Sharepoint Online

    Hi,
    I have one SharePoint Online tenant. We are using REST API to integrate SharePoint to our internal System.
    For my use case I need to get all the SharePoint sites ans Sitecollections. From each SiteCollection I need all the subsites under this.
    I have used below REST Query
    http://<Base site url>/_api/web
    This doesn't give me all the Site collections
    Could any one please give me some way to get all the Site collections and sites from my sharepoint tenant through REST API.
    Thanks,

    Hi Abhiram,
    There seems no such endpoint in SharePoint REST API can retrieve a list of site collections in a SharePoint Online tenant:
    https://msdn.microsoft.com/en-us/library/office/jj860569.aspx#Reference
    If Client Object Model can be an option for you, you can use Tenant object to achieve what you want:
    http://social.technet.microsoft.com/wiki/contents/articles/24050.perform-basic-admin-operations-using-csom-in-sharepoint-online.aspx#Scenario_3_Fetch_All_Site_Collections
    Anyway, I would suggest you submit a feedback to the Office Developer Platform if there any expectation about the future version of REST API of Office 365 SharePoint
    Online:
    http://officespdev.uservoice.com/
    It
    is a place for customers provide feedback about Microsoft Office products. What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft
    Product Team will take it into consideration when designing the next version in the future.
    Thanks 
    Patrick Liang
    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]

  • What is the REST endpoint URL to get list of site collections in Sharepoint ?

    Hi,
    If I go to Sharepoint 2013 site, click on Admin -> Sharepoint, you will see a list of site collections (the link is https://somename-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx)
    What is the REST endpoint URL to retrieve this list of site collections ?
    I was trying _api/search/query?querytext='contentclass:sts_site' or _api/search/query?querytext='contentclass:sts_web', but it doesn't give the whole list...

    As far as i know, There is no REST endpoint at FARM level
    it would be good to see a possible way to do this.
    If my contribution helps you, please click Mark As Answer on that post and
    Vote as Helpful
    Thanks, ShankarSingh(MCP)

  • Managed property in a site collection (powershell - SharePoint online)

    Link to my site collection -> https://web.domain.com/sites/SC/_layouts/15/listmanagedproperties.aspx?level=sitecol
    when opening an url similar to this one and filter on a property name refinablestring00
    What I need is to is to add a mapping to do is to add a mapping
    Mappings to crawled properties
    With powershell.
    Assume that a full crawl has finished. That all crawled properties exist.
    I want to add "ows_GoPro_x0020_Code" and I also want to change the Alias to "ProjectNumber"
    What is the best way to do this via powershell for SharePoint 2013 online?
    Do I need to build a sandboxed solution for this?

    HI,i would recommend  run the PowerShell cmdlet to check if this website exists. Here are the detailed steps:
    1. Set up the SharePoint Online Management Shell Windows PowerShell environment
    http://technet.microsoft.com/en-us/library/fp161372.aspx
    2. Run the command Get-SPOSite, it will return all site collections.
    3. Check if the problematic public site collection is shown in the result. If it shows up, run another command to remove it. For example:
    Remove-SPOSite -Identity https://expertsharepoint/sites/site1 -NoWait
    This will remove the site collection named https://expertsharepoint/sites/site1 from the site collections list and moves it to the Recycle Bin.
    4. Delete the site from the Recycle Bin:
    Remove-SPODeletedSite -Identity https://expertsharepoint/sites/site1
    Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/

  • Issue removing a site collection from Sharepoint Online

    A sharepoint site owner deleted their site by going to site settings delete this site.  This didn't remove the site collection from the Sharepoint Online admin portal in Office 365.  When I attempt to delete here I get the following error "
    Sorry, something went wrong
    There is no site in the current site subscription matching the HiddenSiteSelection control's value.
    I've tried running using Powershell commands to delete the site and I get an error.  
    What do I need to do to remove the site from the admin portal.
    Thanks

    HI,i would recommend  run the PowerShell cmdlet to check if this website exists. Here are the detailed steps:
    1. Set up the SharePoint Online Management Shell Windows PowerShell environment
    http://technet.microsoft.com/en-us/library/fp161372.aspx
    2. Run the command Get-SPOSite, it will return all site collections.
    3. Check if the problematic public site collection is shown in the result. If it shows up, run another command to remove it. For example:
    Remove-SPOSite -Identity https://expertsharepoint/sites/site1 -NoWait
    This will remove the site collection named https://expertsharepoint/sites/site1 from the site collections list and moves it to the Recycle Bin.
    4. Delete the site from the Recycle Bin:
    Remove-SPODeletedSite -Identity https://expertsharepoint/sites/site1
    Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/

  • Publish Page Content-Cross Site Publishing in SharePoint Online

    Is it possible to get Authoring Site's Specific Page's Content/html content (Live in Page Library of Authoring Site and saved as a Catalog) by a Content Search web part added to the Publishing site's page? 
    (Please note that these sites created in SharePoint 2013 Online, Authoring Site activated Cross site Publishing feature and created using team site template, Publishing site created using Publishing Portal template)

    Hi Gihan,
    Glad to hear your issue solved and thanks for your sharing! It is helpful for others who will meet the same issue.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Configure site auditing in sharepoint online using powershell or Client object model

    Is the any way to configure site collection audit settings in sharepoint online programmatically or using powershell.

    Hi Bhism,
    The solution given in the article is for sharepoint 2010, i want to enable site auditing in Sharepoint 2013.
    When i tried using that for sharepoint 2013 making he neccessary changes required for sharepoint 2013 i got an error :
    Unable to find type [Microsoft.SharePoint.SPAuditMaskType]: make sure that the
    assembly containing this type is loaded.
    I think the assembly is for SP2010, is there anything like that for SP2013
    Thanks in Advance.

  • Cross Site Publishing in SharePoint Online

    I was asked to test Cross Site Publishing features in SharePoint 2013 Online. I saved the Authoring site collection's (Used Team Site's Template since Product Catalog Template not avialable in SP Online) Pages library as a Catalog. When I connected that
    catalog in my Publishing site collection, 2 pages created automatically. Category Page is showing the content, but CatelogItem page is empty. How can I configure Content Search Web Part to show the Page Content of the Authoring Sites's page?
    Can we show Authoring sites Pages libraries page content on the publishing site?
    Is this possible in SharePoint Online Cross Site Publishing?

    Hi,
    Thanks for sharing!
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Out of the box sharepoint online 2013 workflow

    Hi All,
    I have a workflow that sends a email to a user after creating a new document.
    Now a want to attach a document to this email but this is not possible with the out of the box SharePoint 2013 solution. I use the SP 2010 workflow because I need to send a email to an external user.
    Is there a solution that I can use to attach a document to a email in a workflow?

    Not possible out of the box. Just curious why would you want to email someone files over the email? I think the logical way is to simply send the item link. This will show user the item details and attachments.
    Anyways, If that's the way you want to do it then check the following codeplex solution out.
    http://spdactivities.codeplex.com/
    I would still recommend you to send the current Item URL in the email instead of sending document as an attachment. 
    If this helped you resolve your issue, please mark it Answered

  • Design guidance: Site workflow for sharepoint online 2013 app store product

    CONTEXT:
    I am in the early design stage for a potential Office 365 Application Store application.
    My initial target customer is small businesses with under 100 employees.
    I will use a structured data store: Initial implementation should be local (lists or Access DB), but potentially scale up to an Azure database.
    My assumption is that the customer would already be Office 365 (2013) E3 customers and this product would be an add on.
    I like workflows because they are user-friendly: I would prefer to leverage the standard SharePoint workflows rather than reinvent the wheel, but I can implement my own workflow with a custom application if I need to.
    I am OK using C#, Access, JavaScript, JQuery, HTML, SQL... whatever gives the best solution. I prefer C#.
    I prefer a Visual Studio solution that I can manage in a source code repository.
    QUESTIONS/GUIDANCE:
    Can a standard SharePoint "Site Workflow" be part of a product delivered via an Office Application Store app?
    Can a Site Workflow work with an external Azure data connection? Can it work with a local Access database?
    Can I start with a SharePoint list, and easily migrate to an Azure database later?
    Or should I forget the standard site workflow completely and just build a C# application?
    Thanks for any guidance.

    Hi,
    First my question is what type of SharePoint Apps you are talking about? SharePoint Hosted, AutoHosted or Provider Hosted apps? For AutoHosted and Provider Hosted apps you have more control - as the apps will be running outside SharePoint and then you can
    run yourworkflow outside SharePoint. Still your app will be able to access SharePoint data using REST API and you have full control of which technology you would like to use your app (C#, asp.net etc.). With SharePoint Hosted apps, your app will be running
    inside SharePoint and you will have limited capabilities to customize - only JS will be allowed in SharePoint hosted apps. You can still use workflow but you can't use external data - unless it's configured through BCS. So my suggestion would be, if are looking
    for an add-ons like solution think about non-SharePoint hosted apps. However if you are thinking of limited capabilities, then think about SharePoint hosted apps.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

Maybe you are looking for