Name
Get-ContentType
Description
The command to get content types from a SharePoint site.
Examples
Get All Content Types
$site = Connect-Site -Url "http://myfarm1/sites/mysitecollection" Get-ContentType -Site $site
Get Content Types Matching Name
$site = Connect-Site -Url "http://myfarm1/sites/mysitecollection" Get-ContentType -Site $site -Name MyName*,MySpecificName
Note: The * symbol is used to call multiple objects with a similar name.
Get Content Types Matching Id
$site = Connect-Site -Url "http://myfarm1/sites/mysitecollection" Get-ContentType -Site $site -Id 0x01004623A4389AACD949BCD666935FE4A582*
Note: The * symbol is used to call multiple objects with a similar Id.
Syntax
Get-ContentType -Site <Site>
[-Name <String[]>]
[-Id <String[]>]
Parameters
-Id <String[]>
Specifies the id (Wildcards supported).
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | True |
Parameter set name | (All) |
Aliases | None |
-Name <String[]>
Specifies the name (Wildcards supported).
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | True |
Parameter set name | (All) |
Aliases | None |
-Site <Site>
Specifies the SharePoint site.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |