Skip to content

New-GitHubTeam

SYNOPSIS

Create a team

SYNTAX

New-GitHubTeam [-Organization] <String> [-Name] <String> [[-Description] <String>] [[-Maintainers] <String[]>]
 [[-RepoNames] <String[]>] [[-Privacy] <String>] [[-NotificationSetting] <String>] [[-Permission] <String>]
 [[-ParentTeamID] <Int32>] [[-Context] <String>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

To create a team, the authenticated user must be a member or owner of {org}. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "Setting team creation permissions."

When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers. For more information, see "About teams".

EXAMPLES

EXAMPLE 1

$params = @{
    Organization = 'github'
    Name         = 'team-name'
    Description  = 'A new team'
    Maintainers  = 'octocat'
    RepoNames    = 'github/octocat'
    Privacy      = 'closed'
    Permission   = 'pull'
}
New-GitHubTeam @params

PARAMETERS

-Organization

The organization name. The name is not case sensitive.

Type: String
Parameter Sets: (All)
Aliases: Org

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

The name of the team.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description

The description of the team.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Maintainers

List GitHub IDs for organization members who will become team maintainers.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RepoNames

The full name (e.g., "organization-name/repository-name") of repositories to add the team to.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Privacy

The level of privacy this team should have. The options are: For a non-nested team: - secret - only visible to organization owners and members of this team. - closed - visible to all members of this organization. Default: secret For a parent or child team: - closed - visible to all members of this organization. Default for child team: closed

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: Closed
Accept pipeline input: False
Accept wildcard characters: False

-NotificationSetting

The notification setting the team has chosen. The options are: notifications_enabled - team members receive notifications when the team is @mentioned. notifications_disabled - no one receives notifications. Default: notifications_enabled

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Permission

Closing down notice. The permission that new repositories will be added to the team with when none is specified.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: Pull
Accept pipeline input: False
Accept wildcard characters: False

-ParentTeamID

The ID of a team to set as the parent team.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Context

The context to run the command in

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 10
Default value: (Get-GitHubConfig -Name DefaultContext)
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Create a team