New-GitHubTeam

SYNOPSIS

Create a team

SYNTAX

Default (Default)

New-GitHubTeam [-Org] <string> -Name <string> [-Description <string>] [-Maintainers <string[]>]
 [-RepoNames <string[]>] [-Privacy <string>] [-NotificationSetting <string>] [-ParentTeamId <long>]
 [-ParentTeamSlug <string>] [-Accept <string>] [-WhatIf] [-Confirm]

Body

New-GitHubTeam [-Org] <string> -Body <Object> [-Name <string>] [-Description <string>]
 [-Maintainers <string[]>] [-RepoNames <string[]>] [-Privacy <string>]
 [-NotificationSetting <string>] [-ParentTeamId <long>] [-ParentTeamSlug <string>]
 [-Accept <string>] [-WhatIf] [-Confirm]

ALIASES

This cmdlet has the following aliases,

  • Get-GHNewTeam

DESCRIPTION

The New-GitHubTeam cmdlet invokes the POST method of the /orgs/{org}/teams endpoint (Create a team)

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 (https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization).”

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 (https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)”.

Endpoint: POST /orgs/{org}/teams API version: 2026-03-10

EXAMPLES

EXAMPLE 1

New-GitHubTeam -Org 'github' -Name 'Justice League' -Body @{ key = 'value' }

Invokes POST /orgs/{org}/teams

EXAMPLE 2

New-GitHubTeam -Org 'github' -Body @{ name = 'Justice League' }

Sends the request body from a hashtable, parameters override the keys of -Body

PARAMETERS

-Accept

The Accept header (media type) of the request Default value: application/vnd.github+json

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Body

The whole request body as a hashtable or object. Keys that are also available as parameters are overwritten by the parameter values

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Body
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Description

The description of the team.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Maintainers

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

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

The name of the team.

Required unless -Body is used

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Body
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Default
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-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’

Body property [ notification_setting ]

Allowed values: ‘notifications_enabled’, ‘notifications_disabled’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Org

The organization name. The name is not case sensitive.

Path parameter [ org ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ParentTeamId

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

Body property [ parent_team_id ]

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ParentTeamSlug

The slug of a team to set as the parent team. Ignored when ‘parent_team_id’ is also provided.

Body property [ parent_team_slug ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-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’

Allowed values: ‘secret’, ‘closed’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-RepoNames

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

Body property [ repo_names ]

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

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

INPUTS

Objects with properties named like the path parameters can be piped to this function

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

OUTPUTS

The response of the GitHub API (objects

{{ Fill in the Description }}

NOTES

OperationId: teams/create Category: teams / teams