Contents
How is a spsite object represented in a web application?
Each SPSite object, or site collection, is represented within an SPSiteCollection object that consists of the collection of all site collections in the Web application. The SPSite type exposes the following members. Initializes a new instance of the SPSite class based on the specified ID for a site collection.
How to check for the existence of a site?
However, there are instances where the site may not exist. I have tried something like $test = Get-SPWeb($siteToGet) if ($test -eq $null ) { Write-Host Site $siteToGet does not exist } else { Write-Host Site $siteToGet DOES exist }
How to initialize a new instance of the spsite class?
Initializes a new instance of the SPSite class based on the specified absolute URL and user token. Initializes a new instance of the SPSite class based on the specified site collection GUID, URL zone, and user token. Represents administration site types supported by SharePoint Foundation.
Which is the full URL to the root web site?
Gets the full URL to the root Web site of the site collection, including host name, port number, and path. Gets information about site usage, including bandwidth, storage, and number of visits to the site collection. Obsolete.
When does spsite get the date and time?
Gets the date and time in Coordinated Universal Time (UTC) when the content of the site was last changed. Gets the date and time in Coordinated Universal Time (UTC) when security on the site was last changed.
How does the site collection work in SharePoint?
Gets the collection of all Web sites that are contained within the site collection, including the top-level site and its subsites. Gets the rights mask for the parent Web application of the site collection. Gets an audit store that is attached to the site collection. Gets or sets the class name of the object that performs audit log trimming.
The SPSite type exposes the following members. Represents administration site types supported by SharePoint Foundation. Used to assign or retrieve the Site Collection Allow Designer property. Used to assign or retrieve the Site Collection property that allows master page editing.