Remove-SCPXEServer

Removes a PXEServer object from the VMM database.

Description

The Remove-SCPXEServer cmdlet removes a PXEServer object from the System Center Virtual Machine Manager (VMM) database, and uninstalls the VMM agent from the Windows Deployment Services computer. This cmdlet does not remove the Windows Deployment Services role from the computer.

For more information about Remove-SCPXEServer, type: "Get-Help Remove-SCPXEServer -online".

Parameters

PXEServer

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a PXE server object.

Credential

Required? true
Accept Pipeline Input? false
Position? named
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task. 

For more information about the PSCredential object, type: "Get-Help Get-Credential". 
For more information about Run As accounts, type: "Get-Help New-SCRunAsAccount".

Confirm

Required? false
Accept Pipeline Input? false
Position? named
Prompts for confirmation before running the command.

Force

Required? false
Accept Pipeline Input? false
Position? named
Forces the operation to complete. 

For example:
- Remove-SCSCVMHost -Force
  Forces the removal of a host object from the VMM database.

- Stop-SCVirtualMachine -Force
  Stops a virtual machine.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Remove a VMM PXE server.
PS C:\> $Credential = Get-SCRunAsAccount "RunAsAcct01"
PS C:\> $PXEServer = Get-SCPXEServer -ComputerName "WDSServer01.Contoso.com"
PS C:\> Remove-SCPXEServer -PXEServer $PXEServer -Credential $Credential -Confirm
The first command uses the Get-Credential cmdlet to prompt you to supply a user name and password and stores the provided credentials in the $Credential variable. The account must have local Administrator permissions on the PXE server.

The second command gbets the PXE server object named WDSServer01 and stores the object in the $PXEServer variable.

The third command removes the PXE server object stored in $PXEServer. As this command is processed, $Credential provides credentials to Remove-SCPXEServer, and the Confirm parameter prompts you to confirm that you do want to remove this PXE server from VMM.

See Also