< Back

Remove-BMServer

Sun Jan 12, 2020 7:21 pm

NAME Remove-BMServer



SYNOPSIS

Removes a server from BuildMaster.





SYNTAX

Remove-BMServer [-Session] <Object> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

The `Remove-BMServer` function removes a server from BuildMaster. Pass the name of the server to remove to the

`Name` parameter. If the server doesn't exist, nothing happens.



Pass the session to the BuildMaster instance where you want to delete the server to the `Session` parameter. Use

`New-BMSession` to create a session object.



This function uses BuildMaster's infrastructure management API.





PARAMETERS

-Session <Object>

The instance of BuildMaster to connect to.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

The name of the server to remove.



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:\\>Remove-BMServer -Session $session -Name 'example.com'



Demonstrates how to delete a server.









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



PS C:\\>Get-BMServer -Session $session -Name 'example.com' | Remove-BMServer -Session $session



Demonstrates that you can pipe the objects returned by `Get-BMServer` into `Remove-BMServer` to remove those

servers.











RELATED LINKS