Remove-SCPXEServer

Removes a PXEServer object from the VMM database.

Syntax

Remove-SCPXEServer
      [-VMMServer <ServerConnection>]
      [-PXEServer] <PxeServer>
      -Credential <VMMCredential>
      [-Force]
      [-RunAsynchronously]
      [-PROTipID <Guid>]
      [-JobVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCPXEServer cmdlet removes a PXEServer object from the 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.

Examples

Example 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 want to remove this PXE server from VMM.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

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.

Type:VMMCredential
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PXEServer

Specifies a PXE server object.

Type:PxeServer
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False