Set-GitHubTeamInOrg
SYNOPSIS
Update a team
SYNTAX
__AllParameterSets
Set-GitHubTeamInOrg [-Org] <string> [-TeamSlug] <string> [-Name <string>] [-Description <string>]
[-Privacy <string>] [-NotificationSetting <string>] [-Permission <string>] [-ParentTeamId <long>]
[-ParentTeamSlug <string>] [-Body <Object>] [-Accept <string>] [-WhatIf] [-Confirm]
ALIASES
This cmdlet has the following aliases,
- Get-GHSetTeamInOrg
DESCRIPTION
The Set-GitHubTeamInOrg cmdlet invokes the PATCH method of the /orgs/{org}/teams/{team_slug} endpoint (Update a team)
To edit a team, the authenticated user must either be an organization owner or a team maintainer. [!NOTE] You can also specify a team by ‘org_id’ and ‘team_id’ using the route ‘PATCH /organizations/{org_id}/team/{team_id}’.
Endpoint: PATCH /orgs/{org}/teams/{team_slug} API version: 2026-03-10
EXAMPLES
EXAMPLE 1
Set-GitHubTeamInOrg -Org 'github' -TeamSlug 'justice-league'
Invokes PATCH /orgs/{org}/teams/{team_slug}
EXAMPLE 2
Set-GitHubTeamInOrg -Org 'github' -TeamSlug 'justice-league' -Body @{ name = 'new team name' }
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: (All)
Position: Named
IsRequired: false
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: ''
-Name
The name 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: ''
-NotificationSetting
The notification setting the team has chosen. Editing teams without specifying this parameter leaves ‘notification_setting’ intact. The options are:
- ‘notifications_enabled’ - team members receive notifications when the team is @mentioned.
- ‘notifications_disabled’ - no one receives notifications.
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: ''
-Permission
Closing down notice. The permission that new repositories will be added to the team with when none is specified.
Default value: pull
Allowed values: ‘pull’, ‘push’, ‘admin’
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. Editing teams without specifying this parameter leaves ‘privacy’ intact. When a team is nested, the ‘privacy’ for parent teams cannot be ‘secret’. 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. For a parent or child team:
- ‘closed’ - visible to all members of this organization.
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: ''
-TeamSlug
The slug of the team name.
Path parameter [ team_slug ]
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
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/update-in-org Category: teams / teams