< Back
Get-BMServerRole
Post
NAME Get-BMServerRole
SYNOPSIS
Returns the server roles.
SYNTAX
Get-BMServerRole -Session <Object> [<CommonParameters>]
Get-BMServerRole -Session <Object> -Name <String> [<CommonParameters>]
DESCRIPTION
The `Get-BMServerRole` function gets all the server roles from an instance of BuildMaster. By default, this
function returns all server roles. To return a specific role, pass its name to the `Name` parameter. The `Name`
parameter supports wildcards. If a server role doesn't exist, you'll get an error.
This function uses BuildMaster's infrastructure management API.
Pass a session object representing the instance of BuildMaster to use to the `Session` parameter. Use
`New-BMSession` to create a session object.
PARAMETERS
-Session <Object>
An object representing the instance of BuildMaster to connect to. Use `New-BMSession` to create session
objects.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
The name of the role to return. Wildcards supported. By default, all roles are returned.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-BMServerRole
Demonstrates how to return a list of all BuildMaster server roles.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-BMServerRole -Name '*Service*'
Demonstrates how to use wildcards to search for a service role.
RELATED LINKS
SYNOPSIS
Returns the server roles.
SYNTAX
Get-BMServerRole -Session <Object> [<CommonParameters>]
Get-BMServerRole -Session <Object> -Name <String> [<CommonParameters>]
DESCRIPTION
The `Get-BMServerRole` function gets all the server roles from an instance of BuildMaster. By default, this
function returns all server roles. To return a specific role, pass its name to the `Name` parameter. The `Name`
parameter supports wildcards. If a server role doesn't exist, you'll get an error.
This function uses BuildMaster's infrastructure management API.
Pass a session object representing the instance of BuildMaster to use to the `Session` parameter. Use
`New-BMSession` to create a session object.
PARAMETERS
-Session <Object>
An object representing the instance of BuildMaster to connect to. Use `New-BMSession` to create session
objects.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
The name of the role to return. Wildcards supported. By default, all roles are returned.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-BMServerRole
Demonstrates how to return a list of all BuildMaster server roles.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-BMServerRole -Name '*Service*'
Demonstrates how to use wildcards to search for a service role.
RELATED LINKS