Pregunta

What is the difference between Get-SPSite and Get-SPSiteAdministration cmdlets?

I know Get-SPSite has more properties, but I want to know the core difference.

Appreciate if u could explain in detail.

¿Fue útil?

Solución

FOR Get-SPSiteAdministrator

The Get-SPSiteAdminitration cmdlet returns a site administration object that allows farm administrators to view certain information about site collections to which they might not have access.

FOR Get-SPSite

The Get-SPSite cmdlet returns either a single site that matches the Identity parameter, or all the sites that match the Filter parameter for the specified scope. The scopes are the WebApplication, ContentDatabase and SiteSubscription parameters. If none of these scopes is provided, the scope is the farm. If the scope is specified with no Filter parameter, all sites in that scope are returned.

The Identity parameter supports providing a partial URL that ends in a wildcard character (*). All site collections that match this partial URL for the specified scope are returned. Additionally, if the Regex parameter is provided, the Identity parameter is treated as a regular expression and any site collection with a URL provided in the given scope that matches the expression is returned.

The Filter parameter is a server-side filter for certain site collection properties that are stored in the content database; without the Filter parameter, filtering on these properties is a slow process. These site collection properties are Owner, SecondaryOwner, and LockState. The Filter parameter is a script block that uses the same syntax as a Where-Object statement, but is run on the server for faster results.

Valid values for LockState are: Unlock, NoAdditions, ReadOnly, NoAccess.

It is important to note that every site collection that the Get-SPSite cmdlet returns is automatically destroyed at the end of the pipeline. To store the results of Get-SPSite in a local variable, use the Start-SPAssignment and Stop-SPAssignment cmdlets to avoid memory leaks.

Licenciado bajo: CC-BY-SA con atribución
scroll top