Add-VSTeamUserEntitlement
SYNOPSIS
Add a user, assign license and extensions and make them a member of a project group in an account.
SYNTAX
Add-VSTeamUserEntitlement -Email <String> [-License <String>] [-Group <String>] [-LicensingSource <String>]
[-MSDNLicenseType <String>] [-ProjectName <String>] [<CommonParameters>]
DESCRIPTION
Add a user, assign license and extensions and make them a member of a project group in an account.
EXAMPLES
Example 1
Add-VSTeamUserEntitlement -License "Advanced" -Group "ProjectAdministrator" -LicensingSource "account" -MSDNLicenseType "professional" -ProjectName "WebAppProject"
This command adds a user to the "WebAppProject" with an "Advanced" license type. The user is made a member of the "ProjectAdministrator" group. The licensing source for this user is set as "account" and the MSDN license type is set as "professional".
Example 2
Add-VSTeamUserEntitlement -License "StakeHolder" -Group "ProjectReader" -LicensingSource "msdn" -MSDNLicenseType "enterprise" -ProjectName "MobileAppProject"
This example adds a user to the "MobileAppProject" with a "StakeHolder" license type. The user is assigned to the "ProjectReader" group. The licensing source is set to "msdn" and the MSDN license type is "enterprise".
Example 3
Add-VSTeamUserEntitlement -License "Professional" -Group "ProjectContributor" -LicensingSource "profile" -MSDNLicenseType "premium" -ProjectName "BackendServices"
In this command, a user is added to the "BackendServices" project with a "Professional" license type. The user is added to the "ProjectContributor" group. The licensing source is set to "profile" and the MSDN license type is "premium".
Example 4
Add-VSTeamUserEntitlement -License "Express" -Group "Custom" -LicensingSource "trial" -MSDNLicenseType "testProfessional" -ProjectName "FrontendUI"
This example adds a user to the "FrontendUI" project with an "Express" license type. The user is made a member of a custom group. The licensing source is set as "trial" and the MSDN license type is "testProfessional".
Example 5
Add-VSTeamUserEntitlement -License "None" -Group "ProjectStakeholder" -LicensingSource "none" -MSDNLicenseType "eligible" -ProjectName "DataAnalytics"
This command adds a user to the "DataAnalytics" project without assigning any specific license (set to "None"). The user is assigned to the "ProjectStakeholder" group. Both the licensing source and the MSDN license type are set to "none" and "eligible" respectively.
PARAMETERS
-Email
Email address of the user to add.
Type: String
Parameter Sets: (All)
Aliases: UserEmail
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-License
Type of Account License. The acceptable values for this parameter are:
- Advanced
- EarlyAdopter
- Express
- None
- Professional
- StakeHolder
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: EarlyAdopter
Accept pipeline input: False
Accept wildcard characters: False
-Group
The acceptable values for this parameter are:
- Custom
- ProjectAdministrator
- ProjectContributor
- ProjectReader
- ProjectStakeholder
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: ProjectContributor
Accept pipeline input: False
Accept wildcard characters: False
-LicensingSource
Licensing Source (e.g. Account. MSDN etc.). The acceptable values for this parameter are:
- account
- auto
- msdn
- none
- profile
- trial
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Account
Accept pipeline input: False
Accept wildcard characters: False
-MSDNLicenseType
Type of MSDN License (e.g. Visual Studio Professional, Visual Studio Enterprise etc.). The acceptable values for this parameter are:
- eligible
- enterprise
- none
- platforms
- premium
- professional
- testProfessional
- ultimate
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProjectName
Specifies the team project for which this function operates.
You can tab complete from a list of available projects.
You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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
System.Object
NOTES
Prerequisites:
Set the account and version that all calls will use with Set-VSTeamAccount. Default version sets to API version 3.0 (TFS2017) if not manually set.
tips:
- check called version of the API with Get-VSTeamAPIVersion or Get-VSTeamInfo
- use Set-VSTeamDefaultProject to set default project for every call
- use Set-VSTeamDefaultAPITimeout to change the default timeout of 60 seconds for all calls.
- use Profiles to load an account and the correct version