How to identify which is rootsite/webapplication url and which are site collection url ?

How to identify which is rootsite/webapplication url and which are site collection url underneath of web application using powershell script in following code?
# Get site objects
$webapplication = Get-SPWebApplication $siteUrl
# Walk through each site in the site collection
foreach($site in $webapplication.Sites)
foreach($subWeb in $site.AllWebs)
$_ = AddLevel123($subWeb.Url)

Hi,
Hope you wanted to know which API is Site collection (SPSite) and Sub site(SPWeb) 
$webapplication.Sites = Site Collection (SPSite)
and $site.AllWebs = Subsite (SPWeb)
and see these links - to get webApplication URL
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e223b607-ab35-454a-a050-1db3005687e5/spwebapplication-url?forum=sharepointdevelopmentlegacy
SPSite Url - SPSite.Url (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spsite.url.aspx)
SPweb URl - SPWeb.URL (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb.url.aspx)
http://social.technet.microsoft.com/Forums/sharepoint/en-US/b4dfb645-69f4-4abd-947c-64ca42af3a26/script-to-get-list-of-sites-and-subsites
Hope this helps!
MCITP: SharePoint 2010 Administrator
MCTS - MOSS 2007 Configuring, .NET 2.0
| SharePoint Architect | Evangelist |
http://www.sharepointdeveloper.in/
http://ramakrishnaraja.blogspot.com/

Similar Messages

  • How to identify that a host is connected to which particular edge switch

    Hello Guys
    Can anybody explain how to identify that a host is connected to which particular edge switch and port in a Cisco SAN Fabric ??

    Hi,
    Hopefully you know the host PWWN. 
    If the edge switch is not in NPV mode, get the FCID from the output of "show fcns database"
    The answer may also be as simple as finding this entry in the "show fcns database detail".
    If not, once you have the fcid, the first byte of the fcid is the switch domain ID. With the combination of "show fcdomain domain-list vsan xx" "show fcs ie" you should be able to determine what you need.
    If the edge switch is in NPV and registers as a NPV device ( Cisco switches do ), then the FCID will be assigned by the core switch upstream of that edge switch.   You can see this from a "show flogi database".  Find the PWWN here.  There will likely be multiple entries for the port where the host is connected.  Once you find the port where the NPV switch is attached.  The first flogi entry on that port will be the switch WWN.  Get the FCID for the switch and then find the entry for this FCID in the "show fcns database detail", this will give you the switch information.
    Best regards,
    Jim

  • How do it know which backup files to keep and which to delete?

    How do you know which backup files to keep and which to delete?

    If you still have all devices, just delete all. They will re backup.

  • How do I stopi-Tunes from downloading songs on my device which I did not order and which I then have to delete?

    How can I stop i-Tunes from downloading songs on my device which I did not order and which I then have to delete because I do not want it?

    Does swiping/dragging across the tracks from right-to-left (or possibly left-to-right depending upon the iOS version) in the Downloads tab in the iTunes store app stop them downloading ?
    If it's the U2 album Songs of Innocence then  : http://itunes.com/soi-remove
    If it's a different album/tracks and you didn't buy them, and nobody else has access to your account and/or devices and bought them, then contact iTunes Support :  http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Using Rename() method to change the Url of path based site collection

    Hello All,
    Is it correct to use
    SPSite.Rename() method for changing the url of path based site collection(except the root)?
    For example:
    Old Site Url: http://portal.contoso.net/sites/HR
    New Site Url: http://portal.contoso.net/sites/HROLD
    It is working in SharePoint 2013 test environment, but I will be happy to receive some feedback from you about this.
    Ivan Yankulov
    SharePoint Admin/Consultant
    http://spyankulov.blogspot.com/
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft

    Hi Lvan,
    Yes, the server object model SPSite.Rename()  method works on an SPSite object to change the URL of a site collection which is host named or path based.
    Best Regards,
    Eric
    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]

  • How to take the back up of  MPOS and planning area

    Hi Gurus ,
    i am using apo dp version 5.0 .We are trying to adding a new key kigfigures in our planning object structure and planning area .
    so,we are trying  take a back up of our Planning objects structure and planning Area .
    1.How to take the back up of MPOS and Planning area  ?
    2. How loading back the data in to the same MPOS and Planning area after adding some keyfigures to MPOS and planning area.?
    I gone  thru the www.help.sap.com but i did not understand properly .
    I would really appreciate if somebody clearly eleborate  the procedural steps .
    Thanks!
    Kriss.

    Hi Kriss,
      First let me clear you some points.
    1. MPOS always contain characteristcis only not the key figures.
    2. Planning area always contain Key figures.
    3. When you create planning area at that you have to assign MPOS & Storage bucket Profile. So Automatcially Characteristcis, Key figures & Time charcteristics realetion mentained.
    Come to your point.
    1. Before creating data source which is depend up on Planning area, you should sure that your basic structure get finalized say, MPOS, Planning area & rest configuration setting. So if you think there will be some extra key figure required after finalizing planning area then in that case you can creat some extra key figure & adding to planning area before finalizing it. So that you can use these key figure in future also.
        What ever data you want to extract from planning area you required whole data extraction process. So whenever you create data source depend up on planning area then automatcially all the info Objects( Char. key figures, time char. ) come in to data source by default. So further you have to replicate it in to APO BW & create rest data extraction process depneds up on data source. So automatcially all the info objects come in to an Info Cube & your extraction process will wrk fine.
    2. Relignment can effect on data transfer from Info Cube to Planning area becz previously your charcteristcis values are different & you had taken back with those characteristcis values, now if you did relignment then charcteristcis values are suppose to be changed, so while loading data from Info cube to Planning area your charcteristcis values will not match & data will not load for those char. values only.
        See, Data always stored in to planning area ( Live cache) against characteristcis, Key figures & time characteristcis. Data is not stored in to MPOS.
    Hope this will help you
    Regards
    Sujay

  • When I am trying to package my artwork in Adobe Illustrator CC, it is not capturing my images and fonts. How do I make sure my linked photos and fonts are captured?

    When I am trying to package my artwork in Adobe Illustrator CC, it is not capturing my images and fonts. How do I make sure my linked photos and fonts are captured?

    Not all fonts can be packaged depending on their licensing. Some fonts are set to not allow packaging. For those you would have to manually locate them on your computer and add them to the folder where the packaging occurred.
    For the images have you checked the "copy links" option?

  • How do i find out what teachers editions and resources are available to compliment etextbooks?

    How do i find out what teachers editions and resources are available to compliment etextbooks?
    I'm researching the possibility of using iPads for our school but I need to make sure that we can get the appropriate teacher resources to go along with the textbooks. Where can I find these?

    I would contact the publisher of the textbook directly.  Apple is just a store, not a publisher.

  • How to give options to user to select multiple site collection url in sharepoint for a web application.

    In my environment, I have one web application, inside which for four different region, we have 4 different site collection. Now head of the company wants, when he logs in , he should get the display of all the four regions urls, and the one which he selects,
    should be redirected.
    Like, suppose I have a web application named as www.abc.com
    Under which I have www.abc.cm/sites/1 and
    www.abc.com/sites/2 and so forth.
    Now when head of the company access this url www.abc.com , he should get the display to select any one of the, url and should be redirected.
    Please suggest how to achieve this.

    You have multiple options.
    1. You can create a links web part and add the links manually.(As there are only 4 sites) 
    2. You can automate by using SharePoint designer.
    http://michael.wilcox.net/2007/10/12/show-all-subsites-in-a-webpart/
    3. Download free web part available here.
    http://sharepoint247.com/sharepoint2010/sharepoint-2010-subsites-webpart/
    Bala

  • How to use Site collection url in feature xml

    Hello Experts,
    I think i am asking a very simple question but this question has realy desturbed me.
    I want to deploy 2 script files using modules in style library.
    here is elements.xml file of module.
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="Scripts" Url="Style Library">
    <File Path="Scripts\jquery-1.3.2.min.js" Url="jquery-1.3.2.min.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
    <File Path="Scripts\splitlinks.js" Url="splitlinks.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"/>
    </Module>
    </Elements>
    but when i activate the feature at root site collection then these files are deployed .. no probulem.
    but when i activate the feature on some other site collection like /sites/test then files should go to /sites/test/Style Library
    but it is not going there !!
    this is my requirement please help
    Mukesh

    Hi,
    Hi,
    Add the Path attribute to the following xml and verify again
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="Scripts" Url="Style Library/Scripts" Path="Style Library">
    <File Path="Scripts\jquery-1.3.2.min.js" Url="jquery-1.3.2.min.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
    <File Path="Scripts\splitlinks.js" Url="splitlinks.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"/>
    </Module>
    </Elements>
    Please mark it answered, if your problem resolved.

  • [SOLVED] How to start JACK with KDE 4? (and which JACK should I use?)

    Hi again
    I'm using KDE 4, and I've just installed JACK again, and since I can't find any decent documentation on this, I'm having a bit of a problem.
    Currently I have jack from [extra] installed, rather than jack2. When I try starting jack as the ArchWiki suggests, i.e. by typing "jackd -d alsa", I get the following error:
    $ jackd -d alsa
    jackd 0.120.1
    Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
    jackd comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details
    could not open driver .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
    JACK compiled with System V SHM support.
    loading driver ..
    creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
    control device hw:0
    the playback device "hw:0" is already in use. Please stop the application using it and run JACK again
    cannot load driver module alsa
    I've also tried jack2 from [community], and after starting it with "jack_control start", I get this...
    $ jack_control start
    --- start
    DBus exception: org.jackaudio.Error.Generic: Failed to start server
    So how do I start it? I'm guessing jack doesn't want to start because some other KDE application grabbed alsa before jackd (but I've been wrong before), and I don't have the slightest idea what jack2 is about with that "generic" error. If anyone would help me shed some light on this, I'd appreciate it a lot.
    Thanks in advance!
    Last edited by Wintershade (2011-03-26 19:22:08)

    @schivmeister thanks that one worked
    Yes, it was knotify4. So now this part works. I've switched to jack2 and it works flawlessly when starting it with jackd
    So this part is solved... now, would you be so kind (if you know) as to point me to some tutorials or howtos (or proper documentation, cos I can't find much of that either) on how to connect various ALSA channels with JACK?
    Basically, I want to route my PCM channel and the Mic channel into Capture 1 (or one to Capture 1 and other to Capture 2), since my Intel HDA audio card doesn't have the "Mix" or "What-U-Hear" or whatever as an available capture source. Any leads on that? (or do I have to open another thread for it?)
    TIA

  • How to Tell Which GPU is in Use and Which CPU Speed

    Is there some way I can find out what clock speed my i7 is running at (i.e. whether or not the computer has gone into over drive) and which GPU is being run at any given time?
    Maybe it is just too soon for a widget, but is there any other way?

    Yes, go to System Profiler.
    On the menu bar
    - Click on the Apple logo > About This Mac
    - Click on More Info...
    - Select Graphics/Displays
    - Select either of the graphics cards. The one that's active will display a load of info in the panel below. The one that's off will say no display connected.
    I don't think there is another way of telling. I'm sure some app will appear or perhaps iStat Pro may include it in future.
    Hope this helps.
    Message was edited by: gtds

  • Get site collection url, site url and list url from a full uri?

    If I have incoming: only URI's of the format http://a.b.c/d/e/f/g/h/i/j/k/l/m/n/o/p.docx
    (And these are coming from multiple farms and multiple site collections) (and i have a web api on some remote server) (and have all the authentication details)
    And I want to query just the single the item via csom : check one column and if value="yes" then download the doc:
    a. how do i get the absolute site url out of it for " clientcontext ctx = new clientcontext(THISURL) "
    b. how do i then get the list uri out of it to push a caml query to to then retrieve it
    I could :
    a. strip off the filename, that is the easy part :)
    b.  I could paste "/_api/contextinfo" behind it and POST it first as a httprequest. Then first get the site and web url and later on
    find a way to find the list url (which is probably the first item behind the fullWebUrl), but it seems weird to mix this in the mix
    Basically im looking for something that tells me what is what in http://a.b.c/d/e/f/g/h/i/j/k/l/m/n/o/p.docx

    Sorry, GetList is only available in the O365 version of Microsoft.SharePoint.Client. If you could test for a root site collection and if there is not one then take the scheme ... + Uri.segments[0] and then get the context. After that you can use
    the GetFileByServerRelativeUrl. The following demonstrates this.
    public static void GetFileList()
    string fileUrl = "http://basesmc15/teamonesubone/teamsubonesubone/Shared%20Documents/folderholder/newauthor6.pdf";
    Uri fileUri = new Uri(fileUrl);
    Uri webUrl;
    ClientContext rootContext = new ClientContext(fileUri.Scheme + Uri.SchemeDelimiter + fileUri.Host);
    webUrl = Web.WebUrlFromPageUrlDirect(rootContext, fileUri);
    ClientContext subContext = new ClientContext(webUrl.ToString());
    File file = subContext.Web.GetFileByServerRelativeUrl(fileUri.AbsolutePath);
    List list = file.ListItemAllFields.ParentList;
    subContext.Load(list);
    subContext.ExecuteQuery();
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Home page URL for a new site collection

    Sorry for the kind of stupid question. I created a new site collection with Site Management menus. The home page has the URL like http://devtfs12/sites/corporate/_layouts/15/start.aspx#/ I expected that it should look like http://sharepoint.firm.lan/sites/corporate/SitePages/Home.aspx
    e.g without "_layouts/15/start.aspx#" is there a  way to change it? Is it possible to set up some sort of redirection so that  http://sharepoint.firm.lan redirects to http://devtfs12/sites/corporate/_layouts/15/start.aspx#/ Thanks!

    Hi,
    You are noticing the URL with _layouts/15/start.aspx because the new feature Minimal Download Strategy is activated on your site. 
    To know more on how it works you can refer the below links
    http://www.wictorwilen.se/sharepoint-2013---introduction-to-the-minimal-download-strategy-mds
    http://www.hezser.de/blog/archive/2012/08/18/what-is-the-_layouts15start-aspx-in-sharepoint-2013.aspx
    If you don't want _layouts/15/start.aspx to be a part of your URL you need to deactivate Minimal Download Strategy feature available under Site Actions -> Manager Site Features
    Note :Minimal Download Strategy is a new framework which is been written to increase the performance of the SharePoint site.
    Also, with SharePoint 2013, you can have Managed Metadata Navigation option. For more information , 
    https://support.office.com/en-nz/article/Enable-managed-navigation-for-a-site-in-SharePoint-49a067dc-77d2-455d-9e77-250ec7cc0a6d
    Hope it helps!
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

  • Right now I'm using version 3.6 somthing, but I would love to update, but I'm nervous cause last time I did my Add ons and Ext that I use didn't work. How would I know if my add ons and exts are compatible with a new version?

    I'm using version 3.6.24 (whatever the latest update was that just took place 2 days ago for the 3.6 Version) What I would like to know is if I update to a newer version like 7 or 8, whichever is not a Beta, how will I know if my add ons and extensions will work? Last time I had updated to a newer version, non of my favorite add ons or extentions would work, so I went back to 3.6. Can you please help cause something needs to be done cause my Firefox crashes a lot when Adobe is being used.
    I also don't know if any of my add ons are crashing my computer. Either Adobe crashes or my whole computer crashes. Can someone please help me?

    you can find which addon are compatible with Firefox 8 by here
    * https://addons.mozilla.org/en-US/firefox/compatibility/10.0

Maybe you are looking for

  • How to retrieve the 'Where Clause' text?

    Hello all, I have created a package to retrieve all the DML's executed against the database for the day, for a particular user. DBMS_LOGMNR package was used to retrieve DMLs. But the DMLs retrieved have their 'WHERE' clause text converted to ROWID's.

  • FSMO Replication Error

    I have been getting a pattern of errors on my DC. I have two pair of eyes on these errors, but everything seems to running ok. The only issue we've had is our workstations were putting out the "Trust domain relationship failed..." error. We were able

  • Colums aren't displayed in column chart

    Hello, I have a problem with Xcelsius. It's not displaying the columns of my column chart in the preview and in the excel-export. The legend is being displayed. Thx for answering, Simon

  • Need help disabling bios cache and shadowing

    Can ANYONE help me put get rid of bios shadowing and cache I keep getting blue screen and I'm tired of it every time I login to the Internet. Please show me where directions are for that or what I can do

  • Reading/Writing BLOB more than 1000 KB

    Hi There, I do not get any error while writing a BLOB over 1000KB but it fails to read it. I can successfully write and read a BLOB less than 1000KB. Is any body knows why this is happening? I am using Oracle10g2 ODBC driver on Windows. Thanks in adv