< Back
New-BMEnvironment
Post
NAME New-BMEnvironment
SYNOPSIS
Creates a new environment in a BuildMaster instance.
SYNTAX
New-BMEnvironment [-Session] <Object> [-Name] <String> [[-ParentName] <String>] [-Inactive] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
The `New-BMEnvironment` creates a new environment in BuildMaster. Pass the name of the environment to the `Name`
parameter. Names may only contain letters, numbers, periods, underscores, or dashes and may not end with an
underscore or dash.
Every environment must have a unique name. If you create a environment with a duplicate name, you'll get an error.
Environments can't be deleted. Deleted environments are just disabled/inactive. If you need to reactivate/enable a
disabled environment, use `Enable-BMEnvironment`. If you try to create a new environment with the same name as an
inactive environment, you'll get an error.
Pass a session object representing the instance of BuildMaster to use to the `Session` parameter. Use the
`New-BMSession` function to create session objects.
This function uses BuildMaster's infrastructure management API.
PARAMETERS
-Session <Object>
An object representing the instance of BuildMaster to connect to. Use `New-BMSession` to create session
objects.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
The name of the environment 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? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ParentName <String>
The name of this environment's parent environemnt.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Inactive [<SwitchParameter>]
By default, new environments are active. If you want the environment to be inactive, use this switch.
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-BMEnvironment -Session $session -Name 'DevNew'
Demonstrates how to create a new environment.
RELATED LINKS
SYNOPSIS
Creates a new environment in a BuildMaster instance.
SYNTAX
New-BMEnvironment [-Session] <Object> [-Name] <String> [[-ParentName] <String>] [-Inactive] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
The `New-BMEnvironment` creates a new environment in BuildMaster. Pass the name of the environment to the `Name`
parameter. Names may only contain letters, numbers, periods, underscores, or dashes and may not end with an
underscore or dash.
Every environment must have a unique name. If you create a environment with a duplicate name, you'll get an error.
Environments can't be deleted. Deleted environments are just disabled/inactive. If you need to reactivate/enable a
disabled environment, use `Enable-BMEnvironment`. If you try to create a new environment with the same name as an
inactive environment, you'll get an error.
Pass a session object representing the instance of BuildMaster to use to the `Session` parameter. Use the
`New-BMSession` function to create session objects.
This function uses BuildMaster's infrastructure management API.
PARAMETERS
-Session <Object>
An object representing the instance of BuildMaster to connect to. Use `New-BMSession` to create session
objects.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
The name of the environment 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? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ParentName <String>
The name of this environment's parent environemnt.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Inactive [<SwitchParameter>]
By default, new environments are active. If you want the environment to be inactive, use this switch.
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-BMEnvironment -Session $session -Name 'DevNew'
Demonstrates how to create a new environment.
RELATED LINKS