Get-CMSite
Updated: March 1, 2013
Applies To: System Center 2012 Configuration Manager SP1
Get-CMSite
Syntax
Parameter Set: SearchByName Get-CMSite [-SiteName <String> ] [ <CommonParameters>] Parameter Set: SearchBySiteCodeMandatory Get-CMSite -SiteCode <String> [ <CommonParameters>]
Detailed Description
The Get-CMSite cmdlet gets one or more Microsoft System Center 2012 Configuration Manager sites. A System Center 2012 Configuration Manager site is a server that has clients assigned to it and that processes client-generated data. You can get a Configuration Manager site by using either a site name or a site code.
Parameters
-SiteCode<String>
Specifies a site code for a Configuration Manager site.
Aliases | none |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-SiteName<String>
Specifies a name for a Configuration Manager site.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Get a site by using a site name
This command gets a System Center 2012 Configuration Manager site by using the site name CMSiteSystem.
PS C:\> Get-CMSite -SiteName "CMSiteSystem"
