< Back

Get-BMServer

Sun Jan 12, 2020 7:06 pm

NAME Get-BMServer



SYNOPSIS

Returns servers in BuildMaster.





SYNTAX

Get-BMServer -Session <Object> [<CommonParameters>]



Get-BMServer -Session <Object> -Name <String> [<CommonParameters>]





DESCRIPTION

The `Get-BMServer` function gets all the servers from an instance of BuildMaster. By default, this function

returns all servers. To return a specific server, pass its name to the `Name` parameter. If a server with that

name doesn't exist, you'll get an error. The `Name` parameter supports wildcards. If you search with wildcards and

a server doesn't exist, you won't get any errors.



The BuildMaster API returns plaintext versions of a server's API key (if it is using AES encryption). This

function converts those keys into `SecureString`s to make it harder to accidentally view/save them.



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 server to return. Wildcards supported. By default, all servers 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-BMServer



Demonstrates how to return a list of all BuildMaster servers.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-BMServer -Name '*example*'



Demonstrates how to use wildcards to search for a server.











RELATED LINKS