< Back

Disable-BMEnvironment

Sun Jan 12, 2020 6:57 pm

NAME Disable-BMEnvironment



SYNOPSIS

Disable an environment in BuildMaster.





SYNTAX

Disable-BMEnvironment [-Session] <Object> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

The `Disable-BMEnvironment` function disables an environment in BuildMaster. Environments are permanent and can

only be disabled, never deleted. Pass the name of the environment to disable to the `Name` parameter. If the

environment doesn't exist, you'll get an error.



Pass the session to the BuildMaster instance where you want to disable the environment to the `Session` parameter.

Use `New-BMSession` to create a session object.



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 disable.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

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:\\>Disable-BMEnvironment -Session $session -Name 'Dev'



Demonstrates how to disable an environment









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



PS C:\\>Get-BMEnvironment -Session $session -Name 'DevOld' | Disable-BMEnvironment -Session $session



Demonstrates that you can pipe the objects returned by `Get-BMEnvironment` into `Disable-BMEnvironment` to disable

those environments.











RELATED LINKS