Get-VSTeamAccounts
SYNOPSIS
Gets the organizations where the user has access. Where the given user is either a member or an owner.
SYNTAX
MemberId
Get-VSTeamAccounts -MemberId <String> [<CommonParameters>]
OwnerId
Get-VSTeamAccounts -OwnerId <String> [<CommonParameters>]
DESCRIPTION
Gets the organizations where the user has access. Where the given user is either a member or an owner.
EXAMPLES
Example 1: Get organizations where the user is owner
$myProfile = Get-VSTeamUserProfile -MyProfile
$orgs = Get-VSTeamAccounts -MemberId $myProfile.id
Example 2: Get organizations where the user is member
$myProfile = Get-VSTeamUserProfile -MyProfile
$orgs = Get-VSTeamAccounts -OwnerId $myProfile.id
PARAMETERS
-MemberId
Gets all organizations where the user is a member.
Type: String
Parameter Sets: MemberId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OwnerId
Gets all organizations where the user is the owner.
Type: String
Parameter Sets: OwnerId
Aliases:
Required: True
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
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