Link

New-TfsUser

Creates a new user in the organization and optionally adds them to projects.


Table of Contents

  1. Syntax
  2. Parameters
  3. Outputs
  4. Related Links

Syntax

New-TfsUser
    [-User <string>]
    [-DisplayName] <string>
    [-Collection <object>]
    [-DefaultGroup <GroupEntitlementType>]
    [-License <AccountLicenseType>]
    [-Passthru]
    [-Project <object>]
    [-Server <object>]

[Go to top]

Parameters

-Collection (Aliases: Organization)

Specifies the URL to the Team Project Collection or Azure DevOps Organization to connect to, a TfsTeamProjectCollection object (Windows PowerShell only), or a VssConnection object. You can also connect to an Azure DevOps Services organizations by simply providing its name instead of the full URL. For more details, see the Get-TfsTeamProjectCollection cmdlet. When omitted, it defaults to the connection set by Connect-TfsTeamProjectCollection (if any).

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-DefaultGroup

Specifies the default group to which the user should be added, when applicable. When omitted, defaults to Contributor. Possible values: Administrator, Contributor, Reader, Stakeholder

Type GroupEntitlementType
Position (Named)
Default Value Contributor
Accept pipeline input False
Accept wildcard characters False

-DisplayName

Specifies the friendly (display) name of the user to be created.

Type string
Position 1
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-License

Specifies the license type for the user to be created. When omitted, defaults to Stakeholder. Possible values: Basic, BasicTestPlans, Stakeholder, VisualStudio

Type AccountLicenseType
Position (Named)
Default Value Stakeholder
Accept pipeline input False
Accept wildcard characters False

-Passthru

Returns the results of the command. By default, this cmdlet does not generate any output.

Type SwitchParameter
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Project (Aliases: Projects)

Specifies the projects to which the user should be added. Can be supplied as an array of project names or a hashtable/dictionary with project names as keys and group names as values. When provided as an array, the user is added to the group specified in the DefaultGroup parameter. When omitted, the user is not added to any projects.

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Server

Specifies the URL to the Team Foundation Server to connect to, a TfsConfigurationServer object (Windows PowerShell only), or a VssConnection object. When omitted, it defaults to the connection set by Connect-TfsConfiguration (if any). For more details, see the Get-TfsConfigurationServer cmdlet.

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-User (Aliases: UserId)

Specifies the ID of the user to be created. For Azure DevOps Services, use the user’s email address. For TFS, use the user’s domain alias.

Type string
Position 0
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

Outputs

Microsoft.VisualStudio.Services.Licensing.AccountEntitlement