Skip to main content

Get-VSTeamSecurityNamespace

SYNOPSIS

List all security namespaces or just the specified namespace.

SYNTAX

List (Default)

Get-VSTeamSecurityNamespace [-LocalOnly] [<CommonParameters>]

ByNamespaceName

Get-VSTeamSecurityNamespace -Name <String> [<CommonParameters>]

ByNamespaceId

Get-VSTeamSecurityNamespace -Id <Guid> [<CommonParameters>]

DESCRIPTION

List all security namespaces or just the specified namespace.

EXAMPLES

Example 1

Get-VSTeamSecurityNamespace

Returns a list of all security namespaces.

Example 2

Get-VSTeamSecurityNamespace -Id "abcdef12-1234-5678-9abc-def123456789"

Returns the security namespace with the specified `Id`.

Example 3

Get-VSTeamSecurityNamespace -Name "Project"

Returns the security namespace with the name "Project".

Example 4

Get-VSTeamSecurityNamespace -LocalOnly

Returns only the local security namespaces.

PARAMETERS

-Id

Security namespace identifier.

Type: Guid
Parameter Sets: ByNamespaceId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

Security namespace name.

Type: String
Parameter Sets: ByNamespaceName
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalOnly

If true, retrieve only local security namespaces.

Type: SwitchParameter
Parameter Sets: List
Aliases:

Required: False
Position: Named
Default value: False
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

vsteam_lib.SecurityNamespace

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