< Back
New-BMServer
Post
NAME New-BMServer
SYNOPSIS
Creates a new server in a BuildMaster instance.
SYNTAX
New-BMServer -Session <Object> -Name <String> -Local [-Environment <String[]>] [-Role <String[]>] [-Variable
<Hashtable>] [-Inactive] [-WhatIf] [-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Windows [-HostName <String>] [-Port <UInt16>] -Ssl [-ForceSsl]
[-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf] [-Confirm]
[<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Windows [-HostName <String>] [-Port <UInt16>] -EncryptionKey
<SecureString> [-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Windows [-HostName <String>] [-Port <UInt16>] [-Environment
<String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf] [-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Ssh [-HostName <String>] [-Port <UInt16>] [-CredentialName
<String>] [-TempPath <String>] [-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive]
[-WhatIf] [-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -PowerShell [-WSManUrl <String>] [-CredentialName <String>]
[-TempPath <String>] [-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
The `New-BMServer` function creates a new server in BuildMaster. Pass the name of the server to the `Name`
parameter. Names may only contain letters, numbers, underscores, or dashes; they must begin with a letter; they
must not end with dash or underscore. Pass the server type to the `Type` parameter. Type must be one of 'windows',
'powershell', 'ssh', or 'local'.
Every server must have a unique name. If you create a server with a duplicate name, 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 the
`New-BMSession` function to create session objects.
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 create. Must contain only letters, numbers, underscores, or dashes. Must begin with
a letter. Must not end with an underscore or dash. Must be between 1 and 50 characters long.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Local [<SwitchParameter>]
Create a local server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Windows [<SwitchParameter>]
Create a Windows server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Ssh [<SwitchParameter>]
Create an SSH server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-HostName <String>
The server's host name. The default is to use the server's name.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Port <UInt16>
The port to use. When adding a Windows server, the default is `46336`. When adding an SSH server, the default
is `22`.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-EncryptionKey <SecureString>
The encryption key to use for the server. When passed, also automatically sets the server's encryption type to
AES. Only used by Windows agents.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Ssl [<SwitchParameter>]
Use SSL to communicate with the server's agent. Only used by Windows agents.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ForceSsl [<SwitchParameter>]
The server's agent only uses SSL. Only used by Windows agents.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PowerShell [<SwitchParameter>]
Create a PowerShell server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WSManUrl <String>
The PowerShell remoting URL to use.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CredentialName <String>
The name of the credential to use when connecting to the server via SSH or PowerShell Remoting.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-TempPath <String>
The temp path directory to use when connecting to the server via SSH or PowerShell Remoting. Default is
`/tmp/buildmaster`.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Environment <String[]>
The environment(s) the server belongs in.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Role <String[]>
The server roles the server is part of.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Variable <Hashtable>
Any server-level variables to add to the server.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Inactive [<SwitchParameter>]
If set, creates the server but marks it as inactive.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
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:\\>New-BMServer -Session $session -Name 'example.com' -Windows
Demonstrates how to create a new server that uses the Inedo Agent on Windows that doesn't encrypt the
communication between the agent and the server.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -Windows -EncryptionKey
'DEADBEEDEADBEEDEADBEEDEADBEEDEAD'
Demonstrates how to create a new server that uses the Inedo Agent on Windows and uses an AES encryption key to
encrypt the communication between the agent and server
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -Windows -Ssl -ForceSsl
Demonstrates how to create a new server that uses the Inedo Agent on Windows and uses SSL to protect server to
agent communications. As of BuildMaster 6.1.8, you *must* use the `ForceSsl` switch, otherwise SSL won't actually
be enabled.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -Ssh
Demonstrates how to create a new server that uses SSH.
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -PowerShell
Demonstrates how to create a new server that uses PowerShell Remoting.
RELATED LINKS
https://inedo.com/support/documentation ... cification
SYNOPSIS
Creates a new server in a BuildMaster instance.
SYNTAX
New-BMServer -Session <Object> -Name <String> -Local [-Environment <String[]>] [-Role <String[]>] [-Variable
<Hashtable>] [-Inactive] [-WhatIf] [-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Windows [-HostName <String>] [-Port <UInt16>] -Ssl [-ForceSsl]
[-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf] [-Confirm]
[<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Windows [-HostName <String>] [-Port <UInt16>] -EncryptionKey
<SecureString> [-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Windows [-HostName <String>] [-Port <UInt16>] [-Environment
<String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf] [-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -Ssh [-HostName <String>] [-Port <UInt16>] [-CredentialName
<String>] [-TempPath <String>] [-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive]
[-WhatIf] [-Confirm] [<CommonParameters>]
New-BMServer -Session <Object> -Name <String> -PowerShell [-WSManUrl <String>] [-CredentialName <String>]
[-TempPath <String>] [-Environment <String[]>] [-Role <String[]>] [-Variable <Hashtable>] [-Inactive] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
The `New-BMServer` function creates a new server in BuildMaster. Pass the name of the server to the `Name`
parameter. Names may only contain letters, numbers, underscores, or dashes; they must begin with a letter; they
must not end with dash or underscore. Pass the server type to the `Type` parameter. Type must be one of 'windows',
'powershell', 'ssh', or 'local'.
Every server must have a unique name. If you create a server with a duplicate name, 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 the
`New-BMSession` function to create session objects.
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 create. Must contain only letters, numbers, underscores, or dashes. Must begin with
a letter. Must not end with an underscore or dash. Must be between 1 and 50 characters long.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Local [<SwitchParameter>]
Create a local server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Windows [<SwitchParameter>]
Create a Windows server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Ssh [<SwitchParameter>]
Create an SSH server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-HostName <String>
The server's host name. The default is to use the server's name.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Port <UInt16>
The port to use. When adding a Windows server, the default is `46336`. When adding an SSH server, the default
is `22`.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-EncryptionKey <SecureString>
The encryption key to use for the server. When passed, also automatically sets the server's encryption type to
AES. Only used by Windows agents.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Ssl [<SwitchParameter>]
Use SSL to communicate with the server's agent. Only used by Windows agents.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ForceSsl [<SwitchParameter>]
The server's agent only uses SSL. Only used by Windows agents.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PowerShell [<SwitchParameter>]
Create a PowerShell server.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WSManUrl <String>
The PowerShell remoting URL to use.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CredentialName <String>
The name of the credential to use when connecting to the server via SSH or PowerShell Remoting.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-TempPath <String>
The temp path directory to use when connecting to the server via SSH or PowerShell Remoting. Default is
`/tmp/buildmaster`.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Environment <String[]>
The environment(s) the server belongs in.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Role <String[]>
The server roles the server is part of.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Variable <Hashtable>
Any server-level variables to add to the server.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Inactive [<SwitchParameter>]
If set, creates the server but marks it as inactive.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
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:\\>New-BMServer -Session $session -Name 'example.com' -Windows
Demonstrates how to create a new server that uses the Inedo Agent on Windows that doesn't encrypt the
communication between the agent and the server.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -Windows -EncryptionKey
'DEADBEEDEADBEEDEADBEEDEADBEEDEAD'
Demonstrates how to create a new server that uses the Inedo Agent on Windows and uses an AES encryption key to
encrypt the communication between the agent and server
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -Windows -Ssl -ForceSsl
Demonstrates how to create a new server that uses the Inedo Agent on Windows and uses SSL to protect server to
agent communications. As of BuildMaster 6.1.8, you *must* use the `ForceSsl` switch, otherwise SSL won't actually
be enabled.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -Ssh
Demonstrates how to create a new server that uses SSH.
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>New-BMServer -Session $session -Name 'example.com' -PowerShell
Demonstrates how to create a new server that uses PowerShell Remoting.
RELATED LINKS
https://inedo.com/support/documentation ... cification