Delete breakpoints from the current console.
Syntax Remove-PSBreakpoint [-Id] Int32[] [-Confirm] [-WhatIf] [CommonParameters] Remove-PSBreakpoint [-Breakpoint] Breakpoint[] [-Confirm] [-WhatIf] [CommonParameters] Key -Breakpoint Breakpoint[] The breakpoints to delete. Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command. (May be piped) -Id Int32[] Delete breakpoints with the specified breakpoint IDs. -Confirm Prompt for confirmation before executing the command. -WhatIf Describes what would happen if you executed the command without actually executing the command.
Standard Aliases for Remove-PSBreakpoint: rbp
A breakpoint is a point in a command or script where execution stops temporarily so that you can examine the instructions.
Delete all of the breakpoints in the current console:
PS C:> Get-PSBreakpoint | Remove-PSBreakpoint
Use the Set-PSBreakpoint cmdlet to create a breakpoint on the windevcluster variable in the demo.ps1 script. Then, save the breakpoint object in the $brk variable and use this to delete the new breakpoint:
PS C:> $brk = Set-PSBreakpoint -script demo.ps1 -variable windevcluster
PS C:> $brk | Remove-PSBreakpoint
Get a breakpoint on the windevcluster function in demo.ps1 by piping a breakpoint ID:
PS C:> $brk = Set-PSBreakpoint -script demo.ps1 -function windevcluster
PS C:> $brk.Id | Get-PSBreakpoint
Delete the breakpoint with breakpoint ID 5:
PS C:> Remove-PSBreakpoint -id 5
A function to delete all of the breakpoints in the current console. To save the function permanently, add it to your PowerShell profile:
PS C:> function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
“Better bend than break” ~ Scottish Proverb
Enable-PSBreakpoint - Enable breakpoints in the current console