Updates from: 08/20/2021 03:32:12
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core About Environment Variables (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
---
-description: Describes how to access Windows environment variables in PowerShell.
-keywords: powershell,cmdlet
+description: Describes how to access Windows environment variables in PowerShell.
Locale: en-US Previously updated : 09/22/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Environment Variables --- # about_Environment_Variables
-## SHORT DESCRIPTION
+## Short description
Describes how to access Windows environment variables in PowerShell.
-## LONG DESCRIPTION
+## Long description
Environment variables store information about the operating system environment. This information includes details such as the operating system
in the Windows Command Shell and the `Setenv` command in UNIX-based
environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class.
-To make changes to Machine-scoped variables, must also have permission. If you
-try to change a value without sufficient permission, the command fails and
+To make changes to Machine-scoped variables, you must also have permission. If
+you try to change a value without sufficient permission, the command fails and
PowerShell displays an error. You can change the values of variables without using a cmdlet using the
Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp")
In this command, the value is enclosed in parentheses so that it is interpreted as a unit.
-## Environment variables that store preferences
-
-PowerShell features can use environment variables to store user preferences.
-These variables work like preference variables, but they are inherited by child
-sessions of the sessions in which they are created. For more information about
-preference variables, see [about_preference_variables](about_Preference_Variables.md).
-
-The environment variables that store preferences include:
--- PSExecutionPolicyPreference-
- Stores the execution policy set for the current session. This environment
- variable exists only when you set an execution policy for a single session.
- You can do this in two different ways.
-
- - Start a session from the command line using the **ExecutionPolicy**
- parameter to set the execution policy for the session.
-
- - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
- a value of "Process".
-
- For more information, see [about_Execution_Policies](about_Execution_Policies.md).
--- PSModuleAnalysisCachePath-
- PowerShell provides control over the file that is used to cache data about
- modules and their cmdlets. The cache is read at startup while searching for a
- command and is written on a background thread sometime after a module is
- imported.
-
- Default location of the cache is:
-
- - `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
-
- The default filename for the cache is `ModuleAnalysisCache`. To change the
- default location of the cache, set the environment variable before starting
- PowerShell. Changes to this environment variable only affect child processes.
- The value should name a full path (including filename) that PowerShell has
- permission to create and write files.
-
- > [!NOTE]
- > If command discovery isn't working correctly, for example Intellisense
- > shows commands that don't exist, you can delete the cache file. The cache
- > is recreated the next time you start PowerShell.
-
- To disable the file cache, set this value to an invalid location, for
- example:
-
- ```powershell
- # `NUL` here is a special device on Windows that cannot be written to
- $env:PSModuleAnalysisCachePath = 'NUL'
- ```
-
- This sets the path to the **NUL** device. PowerShell can't write to the
- path but no error is returned. You can see the errors reported using a
- tracer:
-
- ```powershell
- Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
- ```
--- PSDisableModuleAnalysisCacheCleanup-
- When writing out the module analysis cache, PowerShell checks for modules
- that no longer exist to avoid an unnecessarily large cache. Sometimes these
- checks are not desirable, in which case you can turn them off by setting this
- environment variable value to `1`.
-
- Setting this environment variable takes effect immediately in the current
- process.
--- PSModulePath-
- The `$env:PSModulePath` environment variable contains a list of folder
- locations that are searched to find modules and resources.
-
- By default, the effective locations assigned to `$env:PSModulePath` are:
-
- - System-wide locations: These folders contain modules that ship with
- PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
- This is the location where the Windows management modules are installed.
-
- - User-installed modules: These are modules installed by the user.
- `Install-Module` has a **Scope** parameter that allows you to specify
- whether the module is installed for the current user or for all users. For
- more information, see [Install-Module](xref:PowerShellGet.Install-Module).
-
- - On Windows, the location of the user-specific **CurrentUser** scope is
- the `$HOME\Documents\PowerShell\Modules` folder. The location of the
- **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
-
- In addition, setup programs that install modules in other directories, such
- as the Program Files directory, can append their locations to the value of
- `$env:PSModulePath`.
-
- For more information, see [about_PSModulePath](about_PSModulePath.md).
- ## Managing environment variables PowerShell provides several different methods for managing environment
$newpath = $path + ';C:\Program Files\Fabrikam\Modules'
For more information about the methods of the **System.Environment** class, see [Environment Methods](/dotnet/api/system.environment).
-## SEE ALSO
+## PowerShell's environment variables
+
+PowerShell features can use environment variables to store user preferences.
+These variables work like preference variables, but they are inherited by child
+sessions of the sessions in which they are created. For more information about
+preference variables, see [about_Preference_Variables](about_preference_variables.md).
+
+The environment variables that store preferences include:
+
+- **PSExecutionPolicyPreference**
+
+ Stores the execution policy set for the current session. This environment
+ variable exists only when you set an execution policy for a single session.
+ You can do this in two different ways.
+
+ - Start a session from the command line using the **ExecutionPolicy**
+ parameter to set the execution policy for the session.
+
+ - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
+ a value of "Process".
+
+ For more information, see [about_Execution_Policies](about_Execution_Policies.md).
+
+- **PSModuleAnalysisCachePath**
+
+ PowerShell provides control over the file that is used to cache data about
+ modules and their cmdlets. The cache is read at startup while searching for a
+ command and is written on a background thread sometime after a module is
+ imported.
+
+ Default location of the cache is:
+
+ - `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
+
+ The default filename for the cache is `ModuleAnalysisCache`. To change the
+ default location of the cache, set the environment variable before starting
+ PowerShell. Changes to this environment variable only affect child processes.
+ The value should name a full path (including filename) that PowerShell has
+ permission to create and write files.
+
+ > [!NOTE]
+ > If command discovery isn't working correctly, for example Intellisense
+ > shows commands that don't exist, you can delete the cache file. The cache
+ > is recreated the next time you start PowerShell.
+
+ To disable the file cache, set this value to an invalid location, for
+ example:
+
+ ```powershell
+ # `NUL` here is a special device on Windows that cannot be written to
+ $env:PSModuleAnalysisCachePath = 'NUL'
+ ```
+
+ This sets the path to the **NUL** device. PowerShell can't write to the
+ path but no error is returned. You can see the errors reported using a
+ tracer:
+
+ ```powershell
+ Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
+ ```
+
+- **PSDisableModuleAnalysisCacheCleanup**
+
+ When writing out the module analysis cache, PowerShell checks for modules
+ that no longer exist to avoid an unnecessarily large cache. Sometimes these
+ checks are not desirable, in which case you can turn them off by setting this
+ environment variable value to `1`.
+
+ Setting this environment variable takes effect immediately in the current
+ process.
+
+- **PSModulePath**
+
+ The `$env:PSModulePath` environment variable contains a list of folder
+ locations that are searched to find modules and resources.
+
+ By default, the effective locations assigned to `$env:PSModulePath` are:
+
+ - System-wide locations: These folders contain modules that ship with
+ PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
+ This is the location where the Windows management modules are installed.
+
+ - User-installed modules: These are modules installed by the user.
+ `Install-Module` has a **Scope** parameter that allows you to specify
+ whether the module is installed for the current user or for all users. For
+ more information, see [Install-Module](xref:PowerShellGet.Install-Module).
+
+ - On Windows, the location of the user-specific **CurrentUser** scope is
+ the `$HOME\Documents\PowerShell\Modules` folder. The location of the
+ **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
+
+ In addition, setup programs that install modules in other directories, such
+ as the Program Files directory, can append their locations to the value of
+ `$env:PSModulePath`.
+
+ For more information, see [about_PSModulePath](about_PSModulePath.md).
+
+## See also
- [Environment (provider)](../About/about_Environment_Provider.md) - [about_Modules](about_Modules.md)
Microsoft.PowerShell.Core Debug Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Debug-Job.md
--- external help file: System.Management.Automation.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/debug-job?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Job
Title: Debug-Job
# Debug-Job
-## SYNOPSIS
+## Synopsis
Debugs a running background, remote, or Windows PowerShell Workflow job. ## SYNTAX
Debug-Job [-Id] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Debug-Job** cmdlet lets you debug scripts that are running within jobs.
-The cmdlet is designed to debug Windows PowerShell Workflow jobs, background jobs, and jobs running in remote sessions.
-**Debug-Job** accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on the script it is running.
-The debugger **quit** command stops the job and running script.
-Starting in Windows PowerShell 5.0, the **exit** command detaches the debugger, and allows the job to continue to run.
+## Description
-## EXAMPLES
+The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed
+to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
+accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on
+the script it is running. The debugger `quit` command stops the job and running script. The `exit`
+command detaches the debugger, and allows the job to continue to run.
+
+## Examples
### Example 1: Debug a job by job ID
+This command breaks into a running job with an ID of 3.
+
+```powershell
+Debug-Job -ID 3
```
-PS C:\> Debug-Job -ID 3
+
+```Output
Id Name PSJobTypeName State HasMoreData Location Command -- ---- ------------- ----- ----------- -------- ------- 3 Job3 RemoteJob Running True PowerShellIx TestWFDemo1.ps1
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-This command breaks into a running job with an ID of 3.
-
-## PARAMETERS
+## Parameters
### -Id
-Specifies the ID number of a running job.
-To get the ID number of a job, run the Get-Job cmdlet.
+
+Specifies the ID number of a running job. To get the ID number of a job, run the `Get-Job` cmdlet.
```yaml Type: System.Int32
Accept wildcard characters: False
``` ### -InstanceId
-Specifies the instance ID GUID of a running job.
-To get the *InstanceId* of a job, run the **Get-Job** cmdlet, piping the results into a **Format-*** cmdlet, as shown in the following example:
-`Get-Job | Format-List -Property Id,Name,InstanceId,State`
+Specifies the instance ID GUID of a running job.
```yaml Type: System.Guid
Accept wildcard characters: False
``` ### -Job
-Specifies a running job object.
-The simplest way to use this parameter is to save the results of a **Get-Job** command that returns the running job that you want to debug in a variable, and then specify the variable as the value of this parameter.
+
+Specifies a running job object. The simplest way to use this parameter is to save the results of a
+`Get-Job` command that returns the running job that you want to debug in a variable, and then
+specify the variable as the value of this parameter.
```yaml Type: System.Management.Automation.Job
Accept wildcard characters: False
``` ### -Name
-Specifies a job by the friendly name of the job.
-When you start a job, you can specify a job name by adding the *JobName* parameter, in cmdlets such as Invoke-Command and Start-Job.
+
+Specifies a job by the friendly name of the job. When you start a job, you can specify a job name by
+adding the **JobName** parameter, in cmdlets such as `Invoke-Command` and `Start-Job`.
```yaml Type: System.String
Accept wildcard characters: False
``` ### -Confirm+ Prompts you for confirmation before running the cmdlet. ```yaml
Accept wildcard characters: False
``` ### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
### System.Management.Automation.RemotingJob
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Utility Debug Runspace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Debug-Runspace.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/debug-runspace?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Runspace --- # Debug-Runspace
-## SYNOPSIS
+## Synopsis
Starts an interactive debugging session with a runspace.
-## SYNTAX
+## Syntax
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Runspace [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## EXAMPLES
+## Examples
### Example 1: Debug a remote runspace
-```
+In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
+first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
+PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
+PowerShell ISE host process.
+
+```powershell
PS C:\> Get-Process -ComputerName "WS10TestServer" -Name "*powershell*" Handles WS(K) VM(M) CPU(s) Id ProcessName
Id Name ComputerName Type State Availability
1 Runspace1 WS10TestServer Remote Opened Available 2 RemoteHost WS10TestServer Remote Opened Busy
-PS C:\> [WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
+[WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
Hit Line breakpoint on 'C:\TestWFVar1.ps1:83' At C:\TestWFVar1.ps1:83 char:1
At C:\TestWFVar1.ps1:83 char:1
[Process:1152]: [RSDBG: 2]: PS C:\> > ```
-In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
-first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
-PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
-PowerShell ISE host process.
- In the second command, you run `Enter-PSSession` to open a remote session on WS10TestServer. In the third command, you attach to the Windows PowerShell ISE host process running on the remote server by running `Enter-PSHostProcess`, and specifying the ID of the host process that you obtained in the
In the fourth command, you list available runspaces for process ID 1152 by runni
You note the ID number of the Busy runspace; it is running a script that you want to debug. In the last command, you start debugging an opened runspace that is running a script,
-TestWFVar1.ps1, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
+`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## PARAMETERS
+## Parameters
### -Id
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## RELATED LINKS
+## Related links
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/disable-psbreakpoint?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Disable-PSBreakpoint ---- # Disable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Disables the breakpoints in the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default)
Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confir
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Disable-PSBreakpoint** cmdlet disables breakpoints, which assures that they are not hit when the script runs.
-You can use it to disable all breakpoints, or you can specify breakpoints by submitting breakpoint objects or breakpoint IDs.
+## Description
+
+The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the
+script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
+breakpoint objects or breakpoint IDs.
Technically, this cmdlet changes the value of the Enabled property of a breakpoint object to False.
-To re-enable a breakpoint, use the Enable-PSBreakpoint cmdlet.
-Breakpoints are enabled by default when you create them by using the Set-PSBreakpoint cmdlet.
+To re-enable a breakpoint, use the `Enable-PSBreakpoint` cmdlet. Breakpoints are enabled by default
+when you create them using the `Set-PSBreakpoint` cmdlet.
-A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script.
-**Disable-PSBreakpoint** is one of several cmdlets designed for debugging Windows PowerShell scripts.
-For more information about the Windows PowerShell debugger, see about_Debuggers.
+A breakpoint is a point in a script where execution stops temporarily so that you can examine the
+instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint and disable it
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
-PS C:\> $B | Disable-PSBreakpoint
-```
- These commands disable a newly-created breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the *Name* variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
+$B | Disable-PSBreakpoint
+```
-The second command uses the **Disable-PSBreakpoint** cmdlet to disable the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in $B to the **Disable-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Disable-PSBreakpoint` cmdlet
+disables the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in `$B`
+to the `Disable-PSBreakpoint` cmdlet.
-As a result of this command, the value of the Enabled property of the breakpoint object in $B is False.
+As a result of this command, the value of the **Enabled** property of the breakpoint object in `$B`
+is **False**.
### Example 2: Disable a breakpoint
-```
-PS C:\> Disable-PSBreakpoint -Id 0
-```
- This command disables the breakpoint with breakpoint ID 0.
-### Example 3: Create a disabled breakpoint
-
-```
-PS C:\> Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
-PS C:\> $B
+```powershell
+Disable-PSBreakpoint -Id 0
```
+### Example 3: Create a disabled breakpoint
+ This command creates a new breakpoint that is disabled until you enable it.
-It uses the **Disable-PSBreakpoint** cmdlet to disable the breakpoint.
-The value of the *Breakpoint* parameter is a Set-PSBreakpoint command that sets a new breakpoint, generates a breakpoint object, and saves the object in the $B variable.
+```powershell
+Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
+```
-Cmdlet parameters that take objects as their values can accept a variable that contains the object or a command that gets or generates the object.
-In this case, because **Set-PSBreakpoint** generates a breakpoint object, it can be used as the value of the *Breakpoint* parameter.
+It uses the `Disable-PSBreakpoint` cmdlet to disable the breakpoint. The value of the **Breakpoint**
+parameter is a `Set-PSBreakpoint` command that sets a new breakpoint, generates a breakpoint object,
+and saves the object in the `$B` variable.
-The second command displays the breakpoint object in the value of the $B variable.
+Cmdlet parameters that take objects as their values can accept a variable that contains the object
+or a command that gets or generates the object. In this case, because `Set-PSBreakpoint` generates a
+breakpoint object, it can be used as the value of the **Breakpoint** parameter.
### Example 4: Disable all breakpoints in the current console
-```
-PS C:\> Get-PSBreakpoint | Disable-PSBreakpoint
-```
- This command disables all breakpoints in the current console.
-You can abbreviate this command as: "gbp | dbp".
-## PARAMETERS
+```powershell
+`Get-PSBreakpoint` | Disable-PSBreakpoint
+```
+
+## Parameters
### -Breakpoint
-Specifies the breakpoints to disable.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command.
-You can also pipe breakpoint objects to the **Disable-PSBreakpoint** cmdlet.
+
+Specifies the breakpoints to disable. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to the `Disable-PSBreakpoint` cmdlet.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
``` ### -Id
-Disables the breakpoints with the specified breakpoint IDs.
-Enter the IDs or a variable that contains the IDs.
-You cannot pipe IDs to **Disable-PSBreakpoint**.
+
+Disables the breakpoints with the specified breakpoint IDs. Enter the IDs or a variable that
+contains the IDs. You cannot pipe IDs to `Disable-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
``` ### -PassThru
-Returns an object representing the enabled breakpoints.
-By default, this cmdlet does not generate any output.
+
+Returns an object representing the enabled breakpoints. By default, this cmdlet does not generate
+any output.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
``` ### -Confirm+ Prompts you for confirmation before running the cmdlet. ```yaml
Accept wildcard characters: False
``` ### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
### System.Management.Automation.Breakpoint
-You can pipe a breakpoint object to **Disable-PSBreakpoint**.
-## OUTPUTS
+You can pipe a breakpoint object to `Disable-PSBreakpoint`.
+
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the *PassThru* parameter, **Disable-PSBreakpoint** returns an object that represents the disabled breakpoint.
-Otherwise, this cmdlet does not generate any output.
-## NOTES
+When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents
+the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
+
+## Notes
-## RELATED LINKS
+## Related links
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 10/09/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/enable-psbreakpoint?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Enable-PSBreakpoint
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Enables the breakpoints in the current console.
-## SYNTAX
+## Syntax
### Id (Default)
Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
**True**. `Enable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
-information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## PARAMETERS
+## Parameters
### -Breakpoint
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
+When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that
+represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## NOTES
+## Notes
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpo
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 5/15/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/get-psbreakpoint?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Get-PSBreakpoint --- # Get-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Gets the breakpoints that are set in the current session.
-## SYNTAX
+## Syntax
### Script (Default)
Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParamet
Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Get-PSBreakPoint** cmdlet gets the breakpoints that are set in the current session.
-You can use the cmdlet parameters to get particular breakpoints.
+The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use
+the cmdlet parameters to get particular breakpoints.
A breakpoint is a point in a command or script where execution stops temporarily so that you can
-examine the instructions.
-**Get-PSBreakpoint** is one of several cmdlets designed for debugging Windows PowerShell scripts and
-commands. For more information about the Windows PowerShell debugger, see about_Debuggers.
+examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts and commands. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Get all breakpoints for all scripts and functions
-```
-PS C:\> Get-PSBreakpoint
-```
- This command gets all breakpoints set on all scripts and functions in the current session.
-### Example 2: Get breakpoints by ID
-
-```
-PS C:\> Get-PSBreakpoint -Id 2
-Function :
-IncrementAction :
-Enabled :
-TrueHitCount : 0
-Id : 2
-Script : C:\ps-test\sample.ps1
-ScriptName : C:\ps-test\sample.ps1
+```powershell
+Get-PSBreakpoint
```
-This command gets the breakpoint with breakpoint ID 2.
+### Example 2: Get breakpoints by ID
-### Example 3: Pipe an ID to Get-PSBreakpoint
+This command gets the breakpoint with breakpoint ID 2.
+```powershell
+Get-PSBreakpoint -Id 2
```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Command "Increment"
-PS C:\> $B.Id | Get-PSBreakpoint
+
+```Output
+Function :
+IncrementAction :
+Enabled :
+TrueHitCount : 0
+Id : 2
+Script : C:\ps-test\sample.ps1
+ScriptName : C:\ps-test\sample.ps1
```
-These commands show how to get a breakpoint by piping a breakpoint ID to **Get-PSBreakpoint**.
+### Example 3: Pipe an ID to `Get-PSBreakpoint`
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Increment function
-in the Sample.ps1 script. It saves the breakpoint object in the $B variable.
+These commands show how to get a breakpoint by piping a breakpoint ID to `Get-PSBreakpoint`.
-The second command uses the dot operator (.) to get the Id property of the breakpoint object in the
-$B variable. It uses a pipeline operator (|) to send the ID to the **Get-PSBreakpoint** cmdlet.
+```powershell
+$B = `Set-PSBreakpoint` -Script "sample.ps1" -Command "Increment"
+$B.Id | Get-PSBreakpoint
+```
-As a result, **Get-PSBreakpoint** gets the breakpoint with the specified ID.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the Increment function in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The **Id** property of the breakpoint
+object in the `$B` variable is piped to the `Get-PSBreakpoint` cmdlet to display the breakpoint
+information.
### Example 4: Get breakpoints in specified script files
-```
-PS C:\> Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
-```
+This command gets all of the breakpoints in the `Sample.ps1` and `SupportScript.ps1` files.
-This command gets all of the breakpoints in the Sample.ps1 and SupportScript.ps1 files.
+```powershell
+Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
+```
This command does not get other breakpoints that might be set in other scripts or on functions in the session. ### Example 5: Get breakpoints in specified cmdlets
-```
-PS C:\> Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
-```
+This command gets all Command breakpoints that are set on `Read-Host` or `Write-Host` commands in
+the `Sample.ps1` file.
-This command gets all Command breakpoints that are set on Read-Host or Write-Host commands in the
-Sample.ps1 file.
+```powershell
+Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
+```
### Example 6: Get Command breakpoints in a specified file
-```
-PS C:\> Get-PSBreakpoint -Type Command -Script "Sample.ps1"
+```powershell
+Get-PSBreakpoint -Type Command -Script "Sample.ps1"
``` This command gets all Command breakpoints in the Sample.ps1 file. ### Example 7: Get breakpoints by variable
-```
-PS C:\> Get-PSBreakpoint -Variable "Index, Swap"
-```
+This command gets breakpoints that are set on the `$Index` and `$Swap` variables in the current
+session.
-This command gets breakpoints that are set on the $Index and $Swap variables in the current session.
+```powershell
+Get-PSBreakpoint -Variable "Index, Swap"
+```
### Example 8: Get all Line and Variable breakpoints in a file
-```
-PS C:\> Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
-```
+This command gets all line and variable breakpoints in the `Sample.ps1` script.
-This command gets all line and variable breakpoints in the Sample.ps1 script.
+```powershell
+Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
+```
-## PARAMETERS
+## Parameters
### -Command
-Specifies an array of command breakpoints that are set on the specified command names.
-Enter the command names, such as the name of a cmdlet or function.
+Specifies an array of command breakpoints that are set on the specified command names. Enter the
+command names, such as the name of a cmdlet or function.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Id
-Specifies the breakpoint IDs that this cmdlet gets.
-Enter the IDs in a comma-separated list.
-You can also pipe breakpoint IDs to **Get-PSBreakpoint**.
+Specifies the breakpoint IDs that this cmdlet gets. Enter the IDs in a comma-separated list. You can
+also pipe breakpoint IDs to `Get-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
### -Script
-Specifies an array of scripts that contain the breakpoints.
-Enter the path (optional) and names of one or more script files.
-If you omit the path, the default location is the current directory.
+Specifies an array of scripts that contain the breakpoints. Enter the path (optional) and names of
+one or more script files. If you omit the path, the default location is the current directory.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Type
-Specifies an array of breakpoint types that this cmdlet gets.
-Enter one or more types.
-The acceptable values for this parameter are:
+Specifies an array of breakpoint types that this cmdlet gets. Enter one or more types. The
+acceptable values for this parameter are:
- Line - Command - Variable
-You can also pipe breakpoint types to **Get-PSBreakPoint**.
+You can also pipe breakpoint types to `Get-PSBreakPoint`.
```yaml Type: Microsoft.PowerShell.Commands.BreakpointType[]
Accept wildcard characters: False
### -Variable
-Specifies an array of variable breakpoints that are set on the specified variable names.
-Enter the variable names without dollar signs.
+Specifies an array of variable breakpoints that are set on the specified variable names. Enter the
+variable names without dollar signs.
```yaml Type: System.String[]
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see about_CommonParameters
-(https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
+
+### System.Int32
+
+### Microsoft.PowerShell.Commands.BreakpointType
+
+You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## INPUTS
+## Outputs
-### System.Int32, Microsoft.PowerShell.Commands.BreakpointType
+### System.Management.Automation.CommandBreakpoint
-You can pipe breakpoint IDs and breakpoint types to **Get-PSBreakPoint**.
+### System.Management.Automation.LineBreakpoint
-## OUTPUTS
+### System.Management.Automation.VariableBreakpoint
### System.Management.Automation.Breakpoint
-**Get-PSBreakPoint** returns objects that represent the breakpoints in the session.
+`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## NOTES
+## Notes
-* You can use **Get-PSBreakpoint** or its alias, "gbp".
+You can use `Get-PSBreakpoint` or its alias, "gbp".
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/remove-psbreakpoint?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Remove-PSBreakpoint
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Deletes breakpoints from the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Remove-PSBreakpoint** cmdlet deletes a breakpoint.
-Enter a breakpoint object or a breakpoint ID.
+## Description
-When you remove a breakpoint, the breakpoint object is no longer available or functional.
-If you have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does not function.
+The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
-**Remove-PSBreakpoint** is one of several cmdlets designed for debugging Windows PowerShell scripts.
-For more information about the Windows PowerShell debugger, see about_Debuggers.
+When you remove a breakpoint, the breakpoint object is no longer available or functional. If you
+have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does
+not function.
-## EXAMPLES
+`Remove-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
+information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-### Example 1: Remove all breakpoints
+## Examples
-```
-PS C:\> Get-PSBreakpoint | Remove-PSBreakpoint
-```
+### Example 1: Remove all breakpoints
This command deletes all of the breakpoints in the current console.
-### Example 2: Remove a specified breakpoint
-
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
-PS C:\> $B | Remove-PSBreakpoint
+```powershell
+Get-PSBreakpoint | Remove-PSBreakpoint
```
+### Example 2: Remove a specified breakpoint
+ This command deletes a breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
+$B | Remove-PSBreakpoint
+```
-The second command uses the **Remove-PSBreakpoint** cmdlet to delete the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in the $B variable to the **Remove-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Remove-PSBreakpoint` cmdlet
+deletes the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in the
+`$B` variable to the `Remove-PSBreakpoint` cmdlet.
-As a result of this command, if you run the script, it runs to completion without stopping.
-Also, the **Get-PSBreakpoint** cmdlet does not return this breakpoint.
+As a result of this command, if you run the script, it runs to completion without stopping. Also,
+the `Get-PSBreakpoint` cmdlet does not return this breakpoint.
### Example 3: Remove a breakpoint by ID
-```
-PS C:\> Remove-PSBreakpoint -Id 2
-```
- This command deletes the breakpoint with breakpoint ID 2.
-### Example 4: Use a function to remove all breakpoints
-
-```
-PS C:\> function del-psb { get-psbreakpoint | remove-psbreakpoint }
+```powershell
+Remove-PSBreakpoint -Id 2
```
+### Example 4: Use a function to remove all breakpoints
+ This simple function deletes all of the breakpoints in the current console.
-It uses the Get-PSBreakpoint cmdlet to get the breakpoints.
-Then, it uses a pipeline operator (|) to send the breakpoints to the **Remove-PSBreakpoint** cmdlet, which deletes them.
-As a result, you can type `del-psb` instead of the longer command.
+```powershell
+function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
+```
-To save the function, add it to your Windows PowerShell profile.
+It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator
+(`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## PARAMETERS
+## Parameters
### -Breakpoint
-Specifies the breakpoints to delete.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a **Get-PSBreakpoint** command.
-You can also pipe breakpoint objects to **Remove-PSBreakpoint**.
+
+Specifies the breakpoints to delete. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to `Remove-PSBreakpoint`.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
``` ### -Id+ Specifies breakpoint IDs for which this cmdlet deletes breakpoints. ```yaml
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
+
+### System.Management.Automation.Breakpoint[]
-### System.Management.Automation.Breakpoint
-You can pipe breakpoint objects to **Remove-PSBreakpoint**.
+You can pipe breakpoint objects to `Remove-PSBreakpoint`.
-## OUTPUTS
+### System.Int32[]
+
+### System.Management.Automation.Runspaces.Runspace
+
+## Outputs
### None+ The cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/24/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-psbreakpoint?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSBreakpoint --- # Set-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Sets a breakpoint on a line, command, or variable.
-## SYNTAX
+## Syntax
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
you can use the **Action** parameter to specify an alternate response, such as c
breakpoint or instructions to perform additional tasks such as logging or diagnostics. The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+For more information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint on a line
Set-PSBreakpoint -Script Sample.ps1 -Command "write*"
### Example 5: Set a breakpoint depending on the value of a variable
-This example stops execution at the `DiskTest` function in the Test.ps1 script only when the value of
-the `$Disk` variable is greater than 2.
+This example stops execution at the `DiskTest` function in the `Test.ps1` script only when the value
+of the `$Disk` variable is greater than 2.
```powershell Set-PSBreakpoint -Script "test.ps1" -Command "DiskTest" -Action { if ($Disk -gt 2) { break } }
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## PARAMETERS
+## Parameters
### -Action
Accept wildcard characters: False
Specifies the column number of the column in the script file on which execution stops. Enter only one column number. The default is column 1.
-The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the **Line**
-parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the specified column
-on each of the specified lines. PowerShell stops executing before the statement or expression that
-includes the character at the specified line and column position.
+The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the
+**Line** parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the
+specified column on each of the specified lines. PowerShell stops executing before the statement or
+expression that includes the character at the specified line and column position.
Columns are counted from the top left margin beginning with column number 1 (not 0). If you specify a column that does not exist in the script, an error is not declared, but the breakpoint is never
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe input to `Set-PSBreakpoint`. ## OUTPUTS
-### Breakpoint object (System.Management.Automation.LineBreakpoint, System.Management.Automation.VariableBreakpoint, System.Management.Automation.CommandBreakpoint)
+### System.Management.Automation.CommandBreakpoint
+
+### System.Management.Automation.LineBreakpoint
+
+### System.Management.Automation.VariableBreakpoint
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## NOTES
+## Notes
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
PSReadLine Set Psreadlineoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSReadLine/Set-PSReadLineOption.md
--- external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: PSReadline Last updated 06/30/2020
Specifies the path to the file where history is saved. Computers running Windows
platforms store the file in different locations. The filename is stored in a variable `$($host.Name)_history.txt`, for example `ConsoleHost_history.txt`.
-If you don't use this parameter, the default path is as follows:
-
-**Windows**
+If you don't use this parameter, the default path is:
`$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
-**non-Windows**
-
-`$env:XDG_DATA_HOME/powershell/PSReadLine\$($host.Name)_history.txt`
-
-`$env:HOME/.local/share/powershell/PSReadLine\$($host.Name)_history.txt`
- ```yaml Type: System.String Parameter Sets: (All)
Microsoft.PowerShell.Core About Environment Variables (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
---
-description: Describes how to access Windows environment variables in PowerShell.
-keywords: powershell,cmdlet
+description: Describes how to access Windows environment variables in PowerShell.
Locale: en-US Previously updated : 09/22/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Environment Variables --- # about_Environment_Variables
-## SHORT DESCRIPTION
+## Short description
Describes how to access Windows environment variables in PowerShell.
-## LONG DESCRIPTION
+## Long description
Environment variables store information about the operating system environment. This information includes details such as the operating system
in the Windows Command Shell and the `Setenv` command in UNIX-based
environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class.
-To make changes to Machine-scoped variables, must also have permission. If you
-try to change a value without sufficient permission, the command fails and
+To make changes to Machine-scoped variables, you must also have permission. If
+you try to change a value without sufficient permission, the command fails and
PowerShell displays an error. You can change the values of variables without using a cmdlet using the
variable, use the following syntax:
$Env:Path += ";c:\temp" ```
-On Linux or MacOS, the colon (`:`) in the command separates the new path from
+On Linux or macOS, the colon (`:`) in the command separates the new path from
the path that precedes it in the list. ```powershell
Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp")
In this command, the value is enclosed in parentheses so that it is interpreted as a unit.
-## Environment variables that store preferences
-
-PowerShell features can use environment variables to store user preferences.
-These variables work like preference variables, but they are inherited by child
-sessions of the sessions in which they are created. For more information about
-preference variables, see [about_preference_variables](about_Preference_Variables.md).
-
-The environment variables that store preferences include:
--- PSExecutionPolicyPreference-
- Stores the execution policy set for the current session. This environment
- variable exists only when you set an execution policy for a single session.
- You can do this in two different ways.
-
- - Start a session from the command line using the **ExecutionPolicy**
- parameter to set the execution policy for the session.
-
- - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
- a value of "Process".
-
- For more information, see [about_Execution_Policies](about_Execution_Policies.md).
--- PSModuleAnalysisCachePath-
- PowerShell provides control over the file that is used to cache data about
- modules and their cmdlets. The cache is read at startup while searching for a
- command and is written on a background thread sometime after a module is
- imported.
-
- Default location of the cache is:
-
- - Windows PowerShell 5.1: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
- - PowerShell 6.0 and higher: `$env:LOCALAPPDATA\Microsoft\PowerShell`
- - Non-Windows default: `~/.cache/powershell`
-
- The default filename for the cache is `ModuleAnalysisCache`. When you have
- multiple instances of PowerShell installed, the filename includes a
- hexadecimal suffix so that there is a a unique filename per installation.
-
- > [!NOTE]
- > If command discovery isn't working correctly, for example Intellisense
- > shows commands that don't exist, you can delete the cache file. The cache
- > is recreated the next time you start PowerShell.
-
- To change the default location of the cache, set the environment variable
- before starting PowerShell. Changes to this environment variable only affect
- child processes. The value should name a full path (including filename)
- that PowerShell has permission to create and write files.
-
- To disable the file cache, set this value to an invalid location, for
- example:
-
- ```powershell
- # `NUL` here is a special device on Windows that cannot be written to,
- # on non-Windows you would use ``
- $env:PSModuleAnalysisCachePath = 'NUL'
- ```
-
- This sets the path to the **NUL** device. PowerShell can't write to the
- path but no error is returned. You can see the errors reported using a
- tracer:
-
- ```powershell
- Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
- ```
--- PSDisableModuleAnalysisCacheCleanup-
- When writing out the module analysis cache, PowerShell checks for modules
- that no longer exist to avoid an unnecessarily large cache. Sometimes these
- checks are not desirable, in which case you can turn them off by setting this
- environment variable value to `1`.
-
- Setting this environment variable takes effect immediately in the current
- process.
--- PSModulePath-
- The `$env:PSModulePath` environment variable contains a list of folder
- locations that are searched to find modules and resources.
-
- By default, the effective locations assigned to `$env:PSModulePath` are:
-
- - System-wide locations: These folders contain modules that ship with
- PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
- This is the location where the Windows management modules are installed.
-
- - User-installed modules: These are modules installed by the user.
- `Install-Module` has a **Scope** parameter that allows you to specify
- whether the module is installed for the current user or for all users. For
- more information, see [Install-Module](xref:PowerShellGet.Install-Module).
-
- - On Windows, the location of the user-specific **CurrentUser** scope is
- the `$HOME\Documents\PowerShell\Modules` folder. The location of the
- **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
- - On non-Windows systems, the location of the user-specific **CurrentUser**
- scope is the `$HOME/.local/share/powershell/Modules` folder. The location
- of the **AllUsers** scope is `/usr/local/share/powershell/Modules`.
-
- In addition, setup programs that install modules in other directories, such
- as the Program Files directory, can append their locations to the value of
- `$env:PSModulePath`.
-
- For more information, see [about_PSModulePath](about_PSModulePath.md).
- ## Managing environment variables PowerShell provides several different methods for managing environment
$newpath = $path + ';C:\Program Files\Fabrikam\Modules'
For more information about the methods of the **System.Environment** class, see [Environment Methods](/dotnet/api/system.environment).
-## SEE ALSO
+## PowerShell's environment variables
+
+PowerShell features can use environment variables to store user preferences.
+These variables work like preference variables, but they are inherited by child
+sessions of the sessions in which they are created. For more information about
+preference variables, see [about_Preference_Variables](about_preference_variables.md).
+
+The environment variables that store preferences include:
+
+- **PSExecutionPolicyPreference**
+
+ Stores the execution policy set for the current session. This environment
+ variable exists only when you set an execution policy for a single session.
+ You can do this in two different ways.
+
+ - Start a session from the command line using the **ExecutionPolicy**
+ parameter to set the execution policy for the session.
+
+ - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
+ a value of "Process".
+
+ For more information, see [about_Execution_Policies](about_Execution_Policies.md).
+
+- **PSModuleAnalysisCachePath**
+
+ PowerShell provides control over the file that is used to cache data about
+ modules and their cmdlets. The cache is read at startup while searching for a
+ command and is written on a background thread sometime after a module is
+ imported.
+
+ Default location of the cache is:
+
+ - Windows PowerShell 5.1: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
+ - PowerShell 6.0 and higher: `$env:LOCALAPPDATA\Microsoft\PowerShell`
+ - Non-Windows default: `~/.cache/powershell`
+
+ The default filename for the cache is `ModuleAnalysisCache`. When you have
+ multiple instances of PowerShell installed, the filename includes a
+ hexadecimal suffix so that there is a a unique filename per installation.
+
+ > [!NOTE]
+ > If command discovery isn't working correctly, for example Intellisense
+ > shows commands that don't exist, you can delete the cache file. The cache
+ > is recreated the next time you start PowerShell.
+
+ To change the default location of the cache, set the environment variable
+ before starting PowerShell. Changes to this environment variable only affect
+ child processes. The value should name a full path (including filename)
+ that PowerShell has permission to create and write files.
+
+ To disable the file cache, set this value to an invalid location, for
+ example:
+
+ ```powershell
+ # `NUL` here is a special device on Windows that cannot be written to,
+ # on non-Windows you would use ``
+ $env:PSModuleAnalysisCachePath = 'NUL'
+ ```
+
+ This sets the path to the **NUL** device. PowerShell can't write to the
+ path but no error is returned. You can see the errors reported using a
+ tracer:
+
+ ```powershell
+ Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
+ ```
+
+- **PSDisableModuleAnalysisCacheCleanup**
+
+ When writing out the module analysis cache, PowerShell checks for modules
+ that no longer exist to avoid an unnecessarily large cache. Sometimes these
+ checks are not desirable, in which case you can turn them off by setting this
+ environment variable value to `1`.
+
+ Setting this environment variable takes effect immediately in the current
+ process.
+
+- **PSModulePath**
+
+ The `$env:PSModulePath` environment variable contains a list of folder
+ locations that are searched to find modules and resources.
+
+ By default, the effective locations assigned to `$env:PSModulePath` are:
+
+ - System-wide locations: These folders contain modules that ship with
+ PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
+ This is the location where the Windows management modules are installed.
+
+ - User-installed modules: These are modules installed by the user.
+ `Install-Module` has a **Scope** parameter that allows you to specify
+ whether the module is installed for the current user or for all users. For
+ more information, see [Install-Module](xref:PowerShellGet.Install-Module).
+
+ - On Windows, the location of the user-specific **CurrentUser** scope is
+ the `$HOME\Documents\PowerShell\Modules` folder. The location of the
+ **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
+ - On non-Windows systems, the location of the user-specific **CurrentUser**
+ scope is the `$HOME/.local/share/powershell/Modules` folder. The location
+ of the **AllUsers** scope is `/usr/local/share/powershell/Modules`.
+
+ In addition, setup programs that install modules in other directories, such
+ as the Program Files directory, can append their locations to the value of
+ `$env:PSModulePath`.
+
+ For more information, see [about_PSModulePath](about_PSModulePath.md).
+
+- **POWERSHELL_UPDATECHECK**
+
+ The update notification behavior can be changed using the
+ `POWERSHELL_UPDATECHECK` environment variable. The following values are
+ supported:
+
+ - `Off` turns off the update notification feature
+ - `Default` is the same as not defining `POWERSHELL_UPDATECHECK`:
+ - GA releases notify of updates to GA releases
+ - Preview/RC releases notify of updates to GA and preview releases
+ - `LTS` only notifies of updates to long-term-servicing (LTS) GA releases
+
+ For more information, see [about_Update_Notifications](about_Update_Notifications.md).
+
+- **POWERSHELL_TELEMETRY_OPTOUT**
+
+ To opt-out of telemetry, set the environment variable to `true`, `yes`, or `1`.
+
+ For more information, see [about_Telemetry](about_Telemetry.md).
+
+## Third-party environment variables
+
+On non-Windows platforms, PowerShell uses the following XDG environment
+variables as defined by the [XDG Base Directory Specification][xdg-bds].
+
+- **XDG_CONFIG_HOME**
+- **XDG_DATA_HOME**
+- **XDG_CACHE_HOME**
+
+## See also
- [Environment (provider)](../About/about_Environment_Provider.md) - [about_Modules](about_Modules.md)+
+[xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Microsoft.PowerShell.Core Debug Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Debug-Job.md
--- external help file: System.Management.Automation.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/debug-job?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Job
Title: Debug-Job
# Debug-Job
-## SYNOPSIS
-Debugs a running background, remote, or PowerShell Workflow job.
+## Synopsis
+Debugs a running background or remote job.
-## SYNTAX
+## Syntax
### JobParameterSet (Default) ```
-Debug-Job [-Job] <Job> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Job [-Job] <Job> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ### JobNameParameterSet ```
-Debug-Job [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Job [-Name] <String> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ### JobIdParameterSet ```
-Debug-Job [-Id] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ### JobInstanceIdParameterSet ```
-Debug-Job [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
```
-## DESCRIPTION
-The **Debug-Job** cmdlet lets you debug scripts that are running within jobs.
-The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions.
-**Debug-Job** accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on the script it is running.
-The debugger **quit** command stops the job and running script.
-Starting in Windows PowerShell 5.0, the **exit** command detaches the debugger, and allows the job to continue to run.
+## Description
-## EXAMPLES
+The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed
+to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
+accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on
+the script it is running. The debugger `quit` command stops the job and running script. The `exit`
+command detaches the debugger, and allows the job to continue to run.
+
+## Examples
### Example 1: Debug a job by job ID
+This command breaks into a running job with an ID of 3.
+
+```powershell
+Debug-Job -ID 3
```
-PS C:\> Debug-Job -ID 3
+
+```Output
Id Name PSJobTypeName State HasMoreData Location Command -- ---- ------------- ----- ----------- -------- ------- 3 Job3 RemoteJob Running True PowerShellIx TestWFDemo1.ps1
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-This command breaks into a running job with an ID of 3.
+## Parameters
+
+### -BreakAll
+
+Allows you to break immediately in the current location when the debugger attaches.
-## PARAMETERS
+The parameter is only available as an experimental feature. For more information, see
+[Using experimental features](/powershell/scripting/learn/experimental-features#microsoftpowershellutilitypsmanagebreakpointsinrunspace).
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
### -Id
-Specifies the ID number of a running job.
-To get the ID number of a job, run the Get-Job cmdlet.
+
+Specifies the ID number of a running job. To get the ID number of a job, run the `Get-Job` cmdlet.
```yaml Type: System.Int32
Accept wildcard characters: False
``` ### -InstanceId
-Specifies the instance ID GUID of a running job.
-To get the *InstanceId* of a job, run the **Get-Job** cmdlet, piping the results into a **Format-*** cmdlet, as shown in the following example:
-`Get-Job | Format-List -Property Id,Name,InstanceId,State`
+Specifies the instance ID GUID of a running job.
```yaml Type: System.Guid
Accept wildcard characters: False
``` ### -Job
-Specifies a running job object.
-The simplest way to use this parameter is to save the results of a **Get-Job** command that returns the running job that you want to debug in a variable, and then specify the variable as the value of this parameter.
+
+Specifies a running job object. The simplest way to use this parameter is to save the results of a
+`Get-Job` command that returns the running job that you want to debug in a variable, and then
+specify the variable as the value of this parameter.
```yaml Type: System.Management.Automation.Job
Accept wildcard characters: False
``` ### -Name
-Specifies a job by the friendly name of the job.
-When you start a job, you can specify a job name by adding the *JobName* parameter, in cmdlets such as Invoke-Command and Start-Job.
+
+Specifies a job by the friendly name of the job. When you start a job, you can specify a job name by
+adding the **JobName** parameter, in cmdlets such as `Invoke-Command` and `Start-Job`.
```yaml Type: System.String
Accept wildcard characters: False
``` ### -Confirm+ Prompts you for confirmation before running the cmdlet. ```yaml
Accept wildcard characters: False
``` ### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
### System.Management.Automation.RemotingJob
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Utility Debug Runspace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Debug-Runspace.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/debug-runspace?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Runspace --- # Debug-Runspace
-## SYNOPSIS
+## Synopsis
Starts an interactive debugging session with a runspace.
-## SYNTAX
+## Syntax
### RunspaceParameterSet (Default) ```
-Debug-Runspace [-Runspace] <Runspace> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Runspace [-Runspace] <Runspace> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ### NameParameterSet ```
-Debug-Runspace [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Runspace [-Name] <String> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ### IdParameterSet ```
-Debug-Runspace [-Id] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ### InstanceIdParameterSet ```
-Debug-Runspace [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>]
+Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
```
-## DESCRIPTION
+## Description
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## EXAMPLES
+## Examples
### Example 1: Debug a remote runspace
-```
+In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
+first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
+PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
+PowerShell ISE host process.
+
+```powershell
PS C:\> Get-Process -ComputerName "WS10TestServer" -Name "*powershell*" Handles WS(K) VM(M) CPU(s) Id ProcessName
Id Name ComputerName Type State Availability
1 Runspace1 WS10TestServer Remote Opened Available 2 RemoteHost WS10TestServer Remote Opened Busy
-PS C:\> [WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
+[WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
Hit Line breakpoint on 'C:\TestWFVar1.ps1:83' At C:\TestWFVar1.ps1:83 char:1
At C:\TestWFVar1.ps1:83 char:1
[Process:1152]: [RSDBG: 2]: PS C:\> > ```
-In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
-first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
-PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
-PowerShell ISE host process.
- In the second command, you run `Enter-PSSession` to open a remote session on WS10TestServer. In the third command, you attach to the Windows PowerShell ISE host process running on the remote server by running `Enter-PSHostProcess`, and specifying the ID of the host process that you obtained in the
In the fourth command, you list available runspaces for process ID 1152 by runni
You note the ID number of the Busy runspace; it is running a script that you want to debug. In the last command, you start debugging an opened runspace that is running a script,
-TestWFVar1.ps1, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
+`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## PARAMETERS
+## Parameters
+
+### -BreakAll
+
+Allows you to break immediately in the current location when the debugger attaches.
+
+The parameter is only available as an experimental feature. For more information, see
+[Using experimental features](/powershell/scripting/learn/experimental-features#microsoftpowershellutilitypsmanagebreakpointsinrunspace).
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
### -Id
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## RELATED LINKS
+## Related links
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/disable-psbreakpoint?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Disable-PSBreakpoint --- # Disable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Disables the breakpoints in the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default) ```
-Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
+ [<CommonParameters>]
``` ### Id
Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confir
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Disable-PSBreakpoint** cmdlet disables breakpoints, which assures that they are not hit when the script runs.
-You can use it to disable all breakpoints, or you can specify breakpoints by submitting breakpoint objects or breakpoint IDs.
+The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the
+script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
+breakpoint objects or breakpoint IDs.
Technically, this cmdlet changes the value of the Enabled property of a breakpoint object to False.
-To re-enable a breakpoint, use the Enable-PSBreakpoint cmdlet.
-Breakpoints are enabled by default when you create them by using the Set-PSBreakpoint cmdlet.
+To re-enable a breakpoint, use the `Enable-PSBreakpoint` cmdlet. Breakpoints are enabled by default
+when you create them using the `Set-PSBreakpoint` cmdlet.
-A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script.
-**Disable-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see about_Debuggers.
+A breakpoint is a point in a script where execution stops temporarily so that you can examine the
+instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint and disable it
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
-PS C:\> $B | Disable-PSBreakpoint
-```
- These commands disable a newly-created breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the *Name* variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
+$B | Disable-PSBreakpoint
+```
-The second command uses the **Disable-PSBreakpoint** cmdlet to disable the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in $B to the **Disable-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Disable-PSBreakpoint` cmdlet
+disables the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in `$B`
+to the `Disable-PSBreakpoint` cmdlet.
-As a result of this command, the value of the Enabled property of the breakpoint object in $B is False.
+As a result of this command, the value of the **Enabled** property of the breakpoint object in `$B`
+is **False**.
### Example 2: Disable a breakpoint
-```
-PS C:\> Disable-PSBreakpoint -Id 0
-```
- This command disables the breakpoint with breakpoint ID 0.
-### Example 3: Create a disabled breakpoint
-
-```
-PS C:\> Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
-PS C:\> $B
+```powershell
+Disable-PSBreakpoint -Id 0
```
+### Example 3: Create a disabled breakpoint
+ This command creates a new breakpoint that is disabled until you enable it.
-It uses the **Disable-PSBreakpoint** cmdlet to disable the breakpoint.
-The value of the *Breakpoint* parameter is a Set-PSBreakpoint command that sets a new breakpoint, generates a breakpoint object, and saves the object in the $B variable.
+```powershell
+Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
+```
-Cmdlet parameters that take objects as their values can accept a variable that contains the object or a command that gets or generates the object.
-In this case, because **Set-PSBreakpoint** generates a breakpoint object, it can be used as the value of the *Breakpoint* parameter.
+It uses the `Disable-PSBreakpoint` cmdlet to disable the breakpoint. The value of the **Breakpoint**
+parameter is a `Set-PSBreakpoint` command that sets a new breakpoint, generates a breakpoint object,
+and saves the object in the `$B` variable.
-The second command displays the breakpoint object in the value of the $B variable.
+Cmdlet parameters that take objects as their values can accept a variable that contains the object
+or a command that gets or generates the object. In this case, because `Set-PSBreakpoint` generates a
+breakpoint object, it can be used as the value of the **Breakpoint** parameter.
### Example 4: Disable all breakpoints in the current console
-```
-PS C:\> Get-PSBreakpoint | Disable-PSBreakpoint
-```
- This command disables all breakpoints in the current console.
-You can abbreviate this command as: "gbp | dbp".
-## PARAMETERS
+```powershell
+`Get-PSBreakpoint` | Disable-PSBreakpoint
+```
+
+## Parameters
### -Breakpoint
-Specifies the breakpoints to disable.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command.
-You can also pipe breakpoint objects to the **Disable-PSBreakpoint** cmdlet.
+Specifies the breakpoints to disable. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to the `Disable-PSBreakpoint` cmdlet.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
### -Id
-Disables the breakpoints with the specified breakpoint IDs.
-Enter the IDs or a variable that contains the IDs.
-You cannot pipe IDs to **Disable-PSBreakpoint**.
+Disables the breakpoints with the specified breakpoint IDs. Enter the IDs or a variable that
+contains the IDs. You cannot pipe IDs to `Disable-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
### -PassThru
-Returns an object representing the enabled breakpoints.
-By default, this cmdlet does not generate any output.
+Returns an object representing the enabled breakpoints. By default, this cmdlet does not generate
+any output.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint
-You can pipe a breakpoint object to **Disable-PSBreakpoint**.
+You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the *PassThru* parameter, **Disable-PSBreakpoint** returns an object that represents the disabled breakpoint.
-Otherwise, this cmdlet does not generate any output.
+When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents
+the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 10/09/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/enable-psbreakpoint?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Enable-PSBreakpoint
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Enables the breakpoints in the current console.
-## SYNTAX
+## Syntax
### Id (Default)
Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
**True**. `Enable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
-information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## PARAMETERS
+## Parameters
### -Breakpoint
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
+When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that
+represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## NOTES
+## Notes
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpo
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 5/15/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/get-psbreakpoint?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Get-PSBreakpoint --- # Get-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Gets the breakpoints that are set in the current session.
-## SYNTAX
+## Syntax
### Script (Default)
Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParamet
Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Get-PSBreakPoint** cmdlet gets the breakpoints that are set in the current session.
-You can use the cmdlet parameters to get particular breakpoints.
+The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use
+the cmdlet parameters to get particular breakpoints.
A breakpoint is a point in a command or script where execution stops temporarily so that you can
-examine the instructions.
-**Get-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts and
-commands. For more information about the PowerShell debugger, see about_Debuggers.
+examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts and commands. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Get all breakpoints for all scripts and functions
-```
-PS C:\> Get-PSBreakpoint
-```
- This command gets all breakpoints set on all scripts and functions in the current session.
-### Example 2: Get breakpoints by ID
-
-```
-PS C:\> Get-PSBreakpoint -Id 2
-Function :
-IncrementAction :
-Enabled :
-TrueHitCount : 0
-Id : 2
-Script : C:\ps-test\sample.ps1
-ScriptName : C:\ps-test\sample.ps1
+```powershell
+Get-PSBreakpoint
```
-This command gets the breakpoint with breakpoint ID 2.
+### Example 2: Get breakpoints by ID
-### Example 3: Pipe an ID to Get-PSBreakpoint
+This command gets the breakpoint with breakpoint ID 2.
+```powershell
+Get-PSBreakpoint -Id 2
```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Command "Increment"
-PS C:\> $B.Id | Get-PSBreakpoint
+
+```Output
+Function :
+IncrementAction :
+Enabled :
+TrueHitCount : 0
+Id : 2
+Script : C:\ps-test\sample.ps1
+ScriptName : C:\ps-test\sample.ps1
```
-These commands show how to get a breakpoint by piping a breakpoint ID to **Get-PSBreakpoint**.
+### Example 3: Pipe an ID to `Get-PSBreakpoint`
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Increment function
-in the Sample.ps1 script. It saves the breakpoint object in the $B variable.
+These commands show how to get a breakpoint by piping a breakpoint ID to `Get-PSBreakpoint`.
-The second command uses the dot operator (.) to get the Id property of the breakpoint object in the
-$B variable. It uses a pipeline operator (|) to send the ID to the **Get-PSBreakpoint** cmdlet.
+```powershell
+$B = `Set-PSBreakpoint` -Script "sample.ps1" -Command "Increment"
+$B.Id | Get-PSBreakpoint
+```
-As a result, **Get-PSBreakpoint** gets the breakpoint with the specified ID.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the Increment function in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The **Id** property of the breakpoint
+object in the `$B` variable is piped to the `Get-PSBreakpoint` cmdlet to display the breakpoint
+information.
### Example 4: Get breakpoints in specified script files
-```
-PS C:\> Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
-```
+This command gets all of the breakpoints in the `Sample.ps1` and `SupportScript.ps1` files.
-This command gets all of the breakpoints in the Sample.ps1 and SupportScript.ps1 files.
+```powershell
+Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
+```
This command does not get other breakpoints that might be set in other scripts or on functions in the session. ### Example 5: Get breakpoints in specified cmdlets
-```
-PS C:\> Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
-```
+This command gets all Command breakpoints that are set on `Read-Host` or `Write-Host` commands in
+the `Sample.ps1` file.
-This command gets all Command breakpoints that are set on Read-Host or Write-Host commands in the
-Sample.ps1 file.
+```powershell
+Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
+```
### Example 6: Get Command breakpoints in a specified file
-```
-PS C:\> Get-PSBreakpoint -Type Command -Script "Sample.ps1"
+```powershell
+Get-PSBreakpoint -Type Command -Script "Sample.ps1"
``` This command gets all Command breakpoints in the Sample.ps1 file. ### Example 7: Get breakpoints by variable
-```
-PS C:\> Get-PSBreakpoint -Variable "Index, Swap"
-```
+This command gets breakpoints that are set on the `$Index` and `$Swap` variables in the current
+session.
-This command gets breakpoints that are set on the $Index and $Swap variables in the current session.
+```powershell
+Get-PSBreakpoint -Variable "Index, Swap"
+```
### Example 8: Get all Line and Variable breakpoints in a file
-```
-PS C:\> Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
-```
+This command gets all line and variable breakpoints in the `Sample.ps1` script.
-This command gets all line and variable breakpoints in the Sample.ps1 script.
+```powershell
+Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
+```
-## PARAMETERS
+## Parameters
### -Command
-Specifies an array of command breakpoints that are set on the specified command names.
-Enter the command names, such as the name of a cmdlet or function.
+Specifies an array of command breakpoints that are set on the specified command names. Enter the
+command names, such as the name of a cmdlet or function.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Id
-Specifies the breakpoint IDs that this cmdlet gets.
-Enter the IDs in a comma-separated list.
-You can also pipe breakpoint IDs to **Get-PSBreakpoint**.
+Specifies the breakpoint IDs that this cmdlet gets. Enter the IDs in a comma-separated list. You can
+also pipe breakpoint IDs to `Get-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
### -Script
-Specifies an array of scripts that contain the breakpoints.
-Enter the path (optional) and names of one or more script files.
-If you omit the path, the default location is the current directory.
+Specifies an array of scripts that contain the breakpoints. Enter the path (optional) and names of
+one or more script files. If you omit the path, the default location is the current directory.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Type
-Specifies an array of breakpoint types that this cmdlet gets.
-Enter one or more types.
-The acceptable values for this parameter are:
+Specifies an array of breakpoint types that this cmdlet gets. Enter one or more types. The
+acceptable values for this parameter are:
- Line - Command - Variable
-You can also pipe breakpoint types to **Get-PSBreakPoint**.
+You can also pipe breakpoint types to `Get-PSBreakPoint`.
```yaml Type: Microsoft.PowerShell.Commands.BreakpointType[]
Accept wildcard characters: False
### -Variable
-Specifies an array of variable breakpoints that are set on the specified variable names.
-Enter the variable names without dollar signs.
+Specifies an array of variable breakpoints that are set on the specified variable names. Enter the
+variable names without dollar signs.
```yaml Type: System.String[]
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see about_CommonParameters
-(https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
+
+### System.Int32
+
+### Microsoft.PowerShell.Commands.BreakpointType
+
+You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## INPUTS
+## Outputs
-### System.Int32, Microsoft.PowerShell.Commands.BreakpointType
+### System.Management.Automation.CommandBreakpoint
-You can pipe breakpoint IDs and breakpoint types to **Get-PSBreakPoint**.
+### System.Management.Automation.LineBreakpoint
-## OUTPUTS
+### System.Management.Automation.VariableBreakpoint
### System.Management.Automation.Breakpoint
-**Get-PSBreakPoint** returns objects that represent the breakpoints in the session.
+`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## NOTES
+## Notes
-* You can use **Get-PSBreakpoint** or its alias, "gbp".
+You can use `Get-PSBreakpoint` or its alias, "gbp".
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/remove-psbreakpoint?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Remove-PSBreakpoint
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Deletes breakpoints from the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Remove-PSBreakpoint** cmdlet deletes a breakpoint.
-Enter a breakpoint object or a breakpoint ID.
+## Description
-When you remove a breakpoint, the breakpoint object is no longer available or functional.
-If you have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does not function.
+The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
-**Remove-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see about_Debuggers.
+When you remove a breakpoint, the breakpoint object is no longer available or functional. If you
+have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does
+not function.
-## EXAMPLES
+`Remove-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
+information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-### Example 1: Remove all breakpoints
+## Examples
-```
-PS C:\> Get-PSBreakpoint | Remove-PSBreakpoint
-```
+### Example 1: Remove all breakpoints
This command deletes all of the breakpoints in the current console.
-### Example 2: Remove a specified breakpoint
-
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
-PS C:\> $B | Remove-PSBreakpoint
+```powershell
+Get-PSBreakpoint | Remove-PSBreakpoint
```
+### Example 2: Remove a specified breakpoint
+ This command deletes a breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
+$B | Remove-PSBreakpoint
+```
-The second command uses the **Remove-PSBreakpoint** cmdlet to delete the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in the $B variable to the **Remove-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Remove-PSBreakpoint` cmdlet
+deletes the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in the
+`$B` variable to the `Remove-PSBreakpoint` cmdlet.
-As a result of this command, if you run the script, it runs to completion without stopping.
-Also, the **Get-PSBreakpoint** cmdlet does not return this breakpoint.
+As a result of this command, if you run the script, it runs to completion without stopping. Also,
+the `Get-PSBreakpoint` cmdlet does not return this breakpoint.
### Example 3: Remove a breakpoint by ID
-```
-PS C:\> Remove-PSBreakpoint -Id 2
-```
- This command deletes the breakpoint with breakpoint ID 2.
-### Example 4: Use a function to remove all breakpoints
-
-```
-PS C:\> function del-psb { get-psbreakpoint | remove-psbreakpoint }
+```powershell
+Remove-PSBreakpoint -Id 2
```
+### Example 4: Use a function to remove all breakpoints
+ This simple function deletes all of the breakpoints in the current console.
-It uses the Get-PSBreakpoint cmdlet to get the breakpoints.
-Then, it uses a pipeline operator (|) to send the breakpoints to the **Remove-PSBreakpoint** cmdlet, which deletes them.
-As a result, you can type `del-psb` instead of the longer command.
+```powershell
+function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
+```
-To save the function, add it to your PowerShell profile.
+It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator
+(`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## PARAMETERS
+## Parameters
### -Breakpoint
-Specifies the breakpoints to delete.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a **Get-PSBreakpoint** command.
-You can also pipe breakpoint objects to **Remove-PSBreakpoint**.
+
+Specifies the breakpoints to delete. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to `Remove-PSBreakpoint`.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
``` ### -Id+ Specifies breakpoint IDs for which this cmdlet deletes breakpoints. ```yaml
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
+
+### System.Management.Automation.Breakpoint[]
-### System.Management.Automation.Breakpoint
-You can pipe breakpoint objects to **Remove-PSBreakpoint**.
+You can pipe breakpoint objects to `Remove-PSBreakpoint`.
-## OUTPUTS
+### System.Int32[]
+
+### System.Management.Automation.Runspaces.Runspace
+
+## Outputs
### None+ The cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/24/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-psbreakpoint?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSBreakpoint --- # Set-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Sets a breakpoint on a line, command, or variable.
-## SYNTAX
+## Syntax
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
you can use the **Action** parameter to specify an alternate response, such as c
breakpoint or instructions to perform additional tasks such as logging or diagnostics. The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+For more information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint on a line
Set-PSBreakpoint -Script Sample.ps1 -Command "write*"
### Example 5: Set a breakpoint depending on the value of a variable
-This example stops execution at the `DiskTest` function in the Test.ps1 script only when the value of
-the `$Disk` variable is greater than 2.
+This example stops execution at the `DiskTest` function in the `Test.ps1` script only when the value
+of the `$Disk` variable is greater than 2.
```powershell Set-PSBreakpoint -Script "test.ps1" -Command "DiskTest" -Action { if ($Disk -gt 2) { break } }
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## PARAMETERS
+## Parameters
### -Action
Accept wildcard characters: False
Specifies the column number of the column in the script file on which execution stops. Enter only one column number. The default is column 1.
-The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the **Line**
-parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the specified column
-on each of the specified lines. PowerShell stops executing before the statement or expression that
-includes the character at the specified line and column position.
+The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the
+**Line** parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the
+specified column on each of the specified lines. PowerShell stops executing before the statement or
+expression that includes the character at the specified line and column position.
Columns are counted from the top left margin beginning with column number 1 (not 0). If you specify a column that does not exist in the script, an error is not declared, but the breakpoint is never
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe input to `Set-PSBreakpoint`. ## OUTPUTS
-### Breakpoint object (System.Management.Automation.LineBreakpoint, System.Management.Automation.VariableBreakpoint, System.Management.Automation.CommandBreakpoint)
+### System.Management.Automation.CommandBreakpoint
+
+### System.Management.Automation.LineBreakpoint
+
+### System.Management.Automation.VariableBreakpoint
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## NOTES
+## Notes
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
PSReadLine Set Psreadlineoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSReadLine/Set-PSReadLineOption.md
--- external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: PSReadLine Previously updated : 06/30/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSReadLineOption
If you don't use this parameter, the default path is as follows:
**Windows**
-`$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
+- `$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
**non-Windows**
-`$env:XDG_DATA_HOME/powershell/PSReadLine\$($host.Name)_history.txt`
-
-`$env:HOME/.local/share/powershell/PSReadLine\$($host.Name)_history.txt`
+- `$env:XDG_DATA_HOME/powershell/PSReadLine/$($host.Name)_history.txt`
+- `$env:HOME/.local/share/powershell/PSReadLine/$($host.Name)_history.txt`
```yaml Type: System.String
Microsoft.PowerShell.Core About Environment Variables (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
---
-description: Describes how to access Windows environment variables in PowerShell.
-keywords: powershell,cmdlet
+description: Describes how to access Windows environment variables in PowerShell.
Locale: en-US Previously updated : 09/22/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Environment Variables --- # about_Environment_Variables
-## SHORT DESCRIPTION
+## Short description
Describes how to access Windows environment variables in PowerShell.
-## LONG DESCRIPTION
+## Long description
Environment variables store information about the operating system environment. This information includes details such as the operating system
in the Windows Command Shell and the `Setenv` command in UNIX-based
environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class.
-To make changes to Machine-scoped variables, must also have permission. If you
-try to change a value without sufficient permission, the command fails and
+To make changes to Machine-scoped variables, you must also have permission. If
+you try to change a value without sufficient permission, the command fails and
PowerShell displays an error. You can change the values of variables without using a cmdlet using the
Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp")
In this command, the value is enclosed in parentheses so that it is interpreted as a unit.
-## Environment variables that store preferences
-
-PowerShell features can use environment variables to store user preferences.
-These variables work like preference variables, but they are inherited by child
-sessions of the sessions in which they are created. For more information about
-preference variables, see [about_preference_variables](about_Preference_Variables.md).
-
-The environment variables that store preferences include:
--- PSExecutionPolicyPreference-
- Stores the execution policy set for the current session. This environment
- variable exists only when you set an execution policy for a single session.
- You can do this in two different ways.
-
- - Start a session from the command line using the **ExecutionPolicy**
- parameter to set the execution policy for the session.
-
- - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
- a value of "Process".
-
- For more information, see [about_Execution_Policies](about_Execution_Policies.md).
--- PSModuleAnalysisCachePath-
- PowerShell provides control over the file that is used to cache data about
- modules and their cmdlets. The cache is read at startup while searching for a
- command and is written on a background thread sometime after a module is
- imported.
-
- Default location of the cache is:
-
- - Windows PowerShell 5.1: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
- - PowerShell 6.0 and higher: `$env:LOCALAPPDATA\Microsoft\PowerShell`
- - Non-Windows default: `~/.cache/powershell`
-
- The default filename for the cache is `ModuleAnalysisCache`. When you have
- multiple instances of PowerShell installed, the filename includes a
- hexadecimal suffix so that there is a a unique filename per installation.
-
- > [!NOTE]
- > If command discovery isn't working correctly, for example Intellisense
- > shows commands that don't exist, you can delete the cache file. The cache
- > is recreated the next time you start PowerShell.
-
- To change the default location of the cache, set the environment variable
- before starting PowerShell. Changes to this environment variable only affect
- child processes. The value should name a full path (including filename)
- that PowerShell has permission to create and write files.
-
- To disable the file cache, set this value to an invalid location, for
- example:
-
- ```powershell
- # `NUL` here is a special device on Windows that cannot be written to,
- # on non-Windows you would use ``
- $env:PSModuleAnalysisCachePath = 'NUL'
- ```
-
- This sets the path to the **NUL** device. PowerShell can't write to the
- path but no error is returned. You can see the errors reported using a
- tracer:
-
- ```powershell
- Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
- ```
--- PSDisableModuleAnalysisCacheCleanup-
- When writing out the module analysis cache, PowerShell checks for modules
- that no longer exist to avoid an unnecessarily large cache. Sometimes these
- checks are not desirable, in which case you can turn them off by setting this
- environment variable value to `1`.
-
- Setting this environment variable takes effect immediately in the current
- process.
--- PSModulePath-
- The `$env:PSModulePath` environment variable contains a list of folder
- locations that are searched to find modules and resources.
-
- By default, the effective locations assigned to `$env:PSModulePath` are:
-
- - System-wide locations: These folders contain modules that ship with
- PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
- This is the location where the Windows management modules are installed.
-
- - User-installed modules: These are modules installed by the user.
- `Install-Module` has a **Scope** parameter that allows you to specify
- whether the module is installed for the current user or for all users. For
- more information, see [Install-Module](xref:PowerShellGet.Install-Module).
-
- - On Windows, the location of the user-specific **CurrentUser** scope is
- the `$HOME\Documents\PowerShell\Modules` folder. The location of the
- **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
- - On non-Windows systems, the location of the user-specific **CurrentUser**
- scope is the `$HOME/.local/share/powershell/Modules` folder. The location
- of the **AllUsers** scope is `/usr/local/share/powershell/Modules`.
-
- In addition, setup programs that install modules in other directories, such
- as the Program Files directory, can append their locations to the value of
- `$env:PSModulePath`.
-
- For more information, see [about_PSModulePath](about_PSModulePath.md).
- ## Managing environment variables PowerShell provides several different methods for managing environment
$newpath = $path + ';C:\Program Files\Fabrikam\Modules'
For more information about the methods of the **System.Environment** class, see [Environment Methods](/dotnet/api/system.environment).
-## SEE ALSO
+## PowerShell's environment variables
+
+PowerShell features can use environment variables to store user preferences.
+These variables work like preference variables, but they are inherited by child
+sessions of the sessions in which they are created. For more information about
+preference variables, see [about_Preference_Variables](about_preference_variables.md).
+
+The environment variables that store preferences include:
+
+- **PSExecutionPolicyPreference**
+
+ Stores the execution policy set for the current session. This environment
+ variable exists only when you set an execution policy for a single session.
+ You can do this in two different ways.
+
+ - Start a session from the command line using the **ExecutionPolicy**
+ parameter to set the execution policy for the session.
+
+ - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
+ a value of "Process".
+
+ For more information, see [about_Execution_Policies](about_Execution_Policies.md).
+
+- **PSModuleAnalysisCachePath**
+
+ PowerShell provides control over the file that is used to cache data about
+ modules and their cmdlets. The cache is read at startup while searching for a
+ command and is written on a background thread sometime after a module is
+ imported.
+
+ Default location of the cache is:
+
+ - Windows PowerShell 5.1: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
+ - PowerShell 6.0 and higher: `$env:LOCALAPPDATA\Microsoft\PowerShell`
+ - Non-Windows default: `~/.cache/powershell`
+
+ The default filename for the cache is `ModuleAnalysisCache`. When you have
+ multiple instances of PowerShell installed, the filename includes a
+ hexadecimal suffix so that there is a a unique filename per installation.
+
+ > [!NOTE]
+ > If command discovery isn't working correctly, for example Intellisense
+ > shows commands that don't exist, you can delete the cache file. The cache
+ > is recreated the next time you start PowerShell.
+
+ To change the default location of the cache, set the environment variable
+ before starting PowerShell. Changes to this environment variable only affect
+ child processes. The value should name a full path (including filename)
+ that PowerShell has permission to create and write files.
+
+ To disable the file cache, set this value to an invalid location, for
+ example:
+
+ ```powershell
+ # `NUL` here is a special device on Windows that cannot be written to,
+ # on non-Windows you would use ``
+ $env:PSModuleAnalysisCachePath = 'NUL'
+ ```
+
+ This sets the path to the **NUL** device. PowerShell can't write to the
+ path but no error is returned. You can see the errors reported using a
+ tracer:
+
+ ```powershell
+ Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
+ ```
+
+- **PSDisableModuleAnalysisCacheCleanup**
+
+ When writing out the module analysis cache, PowerShell checks for modules
+ that no longer exist to avoid an unnecessarily large cache. Sometimes these
+ checks are not desirable, in which case you can turn them off by setting this
+ environment variable value to `1`.
+
+ Setting this environment variable takes effect immediately in the current
+ process.
+
+- **PSModulePath**
+
+ The `$env:PSModulePath` environment variable contains a list of folder
+ locations that are searched to find modules and resources.
+
+ By default, the effective locations assigned to `$env:PSModulePath` are:
+
+ - System-wide locations: These folders contain modules that ship with
+ PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
+ This is the location where the Windows management modules are installed.
+
+ - User-installed modules: These are modules installed by the user.
+ `Install-Module` has a **Scope** parameter that allows you to specify
+ whether the module is installed for the current user or for all users. For
+ more information, see [Install-Module](xref:PowerShellGet.Install-Module).
+
+ - On Windows, the location of the user-specific **CurrentUser** scope is
+ the `$HOME\Documents\PowerShell\Modules` folder. The location of the
+ **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
+ - On non-Windows systems, the location of the user-specific **CurrentUser**
+ scope is the `$HOME/.local/share/powershell/Modules` folder. The location
+ of the **AllUsers** scope is `/usr/local/share/powershell/Modules`.
+
+ In addition, setup programs that install modules in other directories, such
+ as the Program Files directory, can append their locations to the value of
+ `$env:PSModulePath`.
+
+ For more information, see [about_PSModulePath](about_PSModulePath.md).
+
+- **POWERSHELL_UPDATECHECK**
+
+ The update notification behavior can be changed using the
+ `POWERSHELL_UPDATECHECK` environment variable. The following values are
+ supported:
+
+ - `Off` turns off the update notification feature
+ - `Default` is the same as not defining `POWERSHELL_UPDATECHECK`:
+ - GA releases notify of updates to GA releases
+ - Preview/RC releases notify of updates to GA and preview releases
+ - `LTS` only notifies of updates to long-term-servicing (LTS) GA releases
+
+ For more information, see [about_Update_Notifications](about_Update_Notifications.md).
+
+- **POWERSHELL_TELEMETRY_OPTOUT**
+
+ To opt-out of telemetry, set the environment variable to `true`, `yes`, or `1`.
+
+ For more information, see [about_Telemetry](about_Telemetry.md).
+
+## Third-party environment variables
+
+On non-Windows platforms, PowerShell uses the following XDG environment
+variables as defined by the [XDG Base Directory Specification][xdg-bds].
+
+- **XDG_CONFIG_HOME**
+- **XDG_DATA_HOME**
+- **XDG_CACHE_HOME**
+
+## See also
- [Environment (provider)](../About/about_Environment_Provider.md) - [about_Modules](about_Modules.md)
+[xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Microsoft.PowerShell.Core Debug Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Debug-Job.md
--- external help file: System.Management.Automation.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/debug-job?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Job
Title: Debug-Job
# Debug-Job
-## SYNOPSIS
-Debugs a running background, remote, or PowerShell Workflow job.
+## Synopsis
+Debugs a running background or remote job.
-## SYNTAX
+## Syntax
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Debug-Job** cmdlet lets you debug scripts that are running within jobs.
-The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions.
-**Debug-Job** accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on the script it is running.
-The debugger **quit** command stops the job and running script.
-Starting in Windows PowerShell 5.0, the **exit** command detaches the debugger, and allows the job to continue to run.
+## Description
-## EXAMPLES
+The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed
+to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
+accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on
+the script it is running. The debugger `quit` command stops the job and running script. The `exit`
+command detaches the debugger, and allows the job to continue to run.
+
+## Examples
### Example 1: Debug a job by job ID
+This command breaks into a running job with an ID of 3.
+
+```powershell
+Debug-Job -ID 3
```
-PS C:\> Debug-Job -ID 3
+
+```Output
Id Name PSJobTypeName State HasMoreData Location Command -- ---- ------------- ----- ----------- -------- ------- 3 Job3 RemoteJob Running True PowerShellIx TestWFDemo1.ps1
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-This command breaks into a running job with an ID of 3.
+## Parameters
+
+### -BreakAll
+
+Allows you to break immediately in the current location when the debugger attaches.
+
+The parameter is only available as an experimental feature. For more information, see
+[Using experimental features](/powershell/scripting/learn/experimental-features#microsoftpowershellutilitypsmanagebreakpointsinrunspace).
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
-## PARAMETERS
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
### -Id
-Specifies the ID number of a running job.
-To get the ID number of a job, run the Get-Job cmdlet.
+
+Specifies the ID number of a running job. To get the ID number of a job, run the `Get-Job` cmdlet.
```yaml Type: System.Int32
Accept wildcard characters: False
``` ### -InstanceId
-Specifies the instance ID GUID of a running job.
-To get the *InstanceId* of a job, run the **Get-Job** cmdlet, piping the results into a **Format-*** cmdlet, as shown in the following example:
-`Get-Job | Format-List -Property Id,Name,InstanceId,State`
+Specifies the instance ID GUID of a running job.
```yaml Type: System.Guid
Accept wildcard characters: False
``` ### -Job
-Specifies a running job object.
-The simplest way to use this parameter is to save the results of a **Get-Job** command that returns the running job that you want to debug in a variable, and then specify the variable as the value of this parameter.
+
+Specifies a running job object. The simplest way to use this parameter is to save the results of a
+`Get-Job` command that returns the running job that you want to debug in a variable, and then
+specify the variable as the value of this parameter.
```yaml Type: System.Management.Automation.Job
Accept wildcard characters: False
``` ### -Name
-Specifies a job by the friendly name of the job.
-When you start a job, you can specify a job name by adding the *JobName* parameter, in cmdlets such as Invoke-Command and Start-Job.
+
+Specifies a job by the friendly name of the job. When you start a job, you can specify a job name by
+adding the **JobName** parameter, in cmdlets such as `Invoke-Command` and `Start-Job`.
```yaml Type: System.String
Accept wildcard characters: False
``` ### -Confirm+ Prompts you for confirmation before running the cmdlet. ```yaml
Accept wildcard characters: False
``` ### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept pipeline input: False
Accept wildcard characters: False ```
-### -BreakAll
-
-{{ Fill BreakAll Description }}
-
-```yaml
-Type: System.Management.Automation.SwitchParameter
-Parameter Sets: (All)
-Aliases:
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
- ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
### System.Management.Automation.RemotingJob
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Get-Job](Get-Job.md)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[Stop-Job](Stop-Job.md) [Wait-Job](Wait-Job.md)-
Microsoft.PowerShell.Utility Debug Runspace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Debug-Runspace.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/debug-runspace?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Runspace --- # Debug-Runspace
-## SYNOPSIS
+## Synopsis
Starts an interactive debugging session with a runspace.
-## SYNTAX
+## Syntax
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters
Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## EXAMPLES
+## Examples
### Example 1: Debug a remote runspace
-```
+In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
+first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
+PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
+PowerShell ISE host process.
+
+```powershell
PS C:\> Get-Process -ComputerName "WS10TestServer" -Name "*powershell*" Handles WS(K) VM(M) CPU(s) Id ProcessName
Id Name ComputerName Type State Availability
1 Runspace1 WS10TestServer Remote Opened Available 2 RemoteHost WS10TestServer Remote Opened Busy
-PS C:\> [WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
+[WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
Hit Line breakpoint on 'C:\TestWFVar1.ps1:83' At C:\TestWFVar1.ps1:83 char:1
At C:\TestWFVar1.ps1:83 char:1
[Process:1152]: [RSDBG: 2]: PS C:\> > ```
-In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
-first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
-PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
-PowerShell ISE host process.
- In the second command, you run `Enter-PSSession` to open a remote session on WS10TestServer. In the third command, you attach to the Windows PowerShell ISE host process running on the remote server by running `Enter-PSHostProcess`, and specifying the ID of the host process that you obtained in the
In the fourth command, you list available runspaces for process ID 1152 by runni
You note the ID number of the Busy runspace; it is running a script that you want to debug. In the last command, you start debugging an opened runspace that is running a script,
-TestWFVar1.ps1, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
+`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## PARAMETERS
+## Parameters
+
+### -BreakAll
+
+Allows you to break immediately in the current location when the debugger attaches.
+
+The parameter is only available as an experimental feature. For more information, see
+[Using experimental features](/powershell/scripting/learn/experimental-features#microsoftpowershellutilitypsmanagebreakpointsinrunspace).
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
### -Id
Accept pipeline input: False
Accept wildcard characters: False ```
-### -BreakAll
-
-{{ Fill BreakAll Description }}
-
-```yaml
-Type: System.Management.Automation.SwitchParameter
-Parameter Sets: (All)
-Aliases:
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
- ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## RELATED LINKS
+## Related links
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
added to the running list only if it meets the following criteria.
[Enter-PSHostProcess](../Microsoft.PowerShell.Core/Enter-PSHostProcess.md) [Enter-PSSession](../Microsoft.PowerShell.Core/Enter-PSSession.md)-
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/disable-psbreakpoint?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Disable-PSBreakpoint --- # Disable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Disables the breakpoints in the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default) ```
-Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
+ [<CommonParameters>]
``` ### Id
Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confir
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
-The **Disable-PSBreakpoint** cmdlet disables breakpoints, which assures that they are not hit when the script runs.
-You can use it to disable all breakpoints, or you can specify breakpoints by submitting breakpoint objects or breakpoint IDs.
+The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the
+script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
+breakpoint objects or breakpoint IDs.
Technically, this cmdlet changes the value of the Enabled property of a breakpoint object to False.
-To re-enable a breakpoint, use the Enable-PSBreakpoint cmdlet.
-Breakpoints are enabled by default when you create them by using the Set-PSBreakpoint cmdlet.
+To re-enable a breakpoint, use the `Enable-PSBreakpoint` cmdlet. Breakpoints are enabled by default
+when you create them using the `Set-PSBreakpoint` cmdlet.
-A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script.
-**Disable-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see about_Debuggers.
+A breakpoint is a point in a script where execution stops temporarily so that you can examine the
+instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint and disable it
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
-PS C:\> $B | Disable-PSBreakpoint
-```
- These commands disable a newly-created breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the *Name* variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
+$B | Disable-PSBreakpoint
+```
-The second command uses the **Disable-PSBreakpoint** cmdlet to disable the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in $B to the **Disable-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Disable-PSBreakpoint` cmdlet
+disables the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in `$B`
+to the `Disable-PSBreakpoint` cmdlet.
-As a result of this command, the value of the Enabled property of the breakpoint object in $B is False.
+As a result of this command, the value of the **Enabled** property of the breakpoint object in `$B`
+is **False**.
### Example 2: Disable a breakpoint
-```
-PS C:\> Disable-PSBreakpoint -Id 0
-```
- This command disables the breakpoint with breakpoint ID 0.
-### Example 3: Create a disabled breakpoint
-
-```
-PS C:\> Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
-PS C:\> $B
+```powershell
+Disable-PSBreakpoint -Id 0
```
+### Example 3: Create a disabled breakpoint
+ This command creates a new breakpoint that is disabled until you enable it.
-It uses the **Disable-PSBreakpoint** cmdlet to disable the breakpoint.
-The value of the *Breakpoint* parameter is a Set-PSBreakpoint command that sets a new breakpoint, generates a breakpoint object, and saves the object in the $B variable.
+```powershell
+Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
+```
-Cmdlet parameters that take objects as their values can accept a variable that contains the object or a command that gets or generates the object.
-In this case, because **Set-PSBreakpoint** generates a breakpoint object, it can be used as the value of the *Breakpoint* parameter.
+It uses the `Disable-PSBreakpoint` cmdlet to disable the breakpoint. The value of the **Breakpoint**
+parameter is a `Set-PSBreakpoint` command that sets a new breakpoint, generates a breakpoint object,
+and saves the object in the `$B` variable.
-The second command displays the breakpoint object in the value of the $B variable.
+Cmdlet parameters that take objects as their values can accept a variable that contains the object
+or a command that gets or generates the object. In this case, because `Set-PSBreakpoint` generates a
+breakpoint object, it can be used as the value of the **Breakpoint** parameter.
### Example 4: Disable all breakpoints in the current console
-```
-PS C:\> Get-PSBreakpoint | Disable-PSBreakpoint
-```
- This command disables all breakpoints in the current console.
-You can abbreviate this command as: "gbp | dbp".
-## PARAMETERS
+```powershell
+`Get-PSBreakpoint` | Disable-PSBreakpoint
+```
+
+## Parameters
### -Breakpoint
-Specifies the breakpoints to disable.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command.
-You can also pipe breakpoint objects to the **Disable-PSBreakpoint** cmdlet.
+Specifies the breakpoints to disable. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to the `Disable-PSBreakpoint` cmdlet.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
### -Id
-Disables the breakpoints with the specified breakpoint IDs.
-Enter the IDs or a variable that contains the IDs.
-You cannot pipe IDs to **Disable-PSBreakpoint**.
+Disables the breakpoints with the specified breakpoint IDs. Enter the IDs or a variable that
+contains the IDs. You cannot pipe IDs to `Disable-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
### -PassThru
-Returns an object representing the enabled breakpoints.
-By default, this cmdlet does not generate any output.
+Returns an object representing the enabled breakpoints. By default, this cmdlet does not generate
+any output.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint
-You can pipe a breakpoint object to **Disable-PSBreakpoint**.
+You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the *PassThru* parameter, **Disable-PSBreakpoint** returns an object that represents the disabled breakpoint.
-Otherwise, this cmdlet does not generate any output.
+When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents
+the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Otherwise, this cmdlet does not generate any output.
[Remove-PSBreakpoint](Remove-PSBreakpoint.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 10/09/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/enable-psbreakpoint?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Enable-PSBreakpoint
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Enables the breakpoints in the current console.
-## SYNTAX
+## Syntax
-### Id (Default)
+### Breakpoint (Default)
```
-Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
+ [<CommonParameters>]
```
-### Breakpoint
+### Id
```
-Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
- [<CommonParameters>]
+Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
```
-## DESCRIPTION
+## Description
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
**True**. `Enable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
-information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## PARAMETERS
+## Parameters
### -Breakpoint
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
+When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that
+represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## NOTES
+## Notes
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpo
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpo
[Remove-PSBreakpoint](Remove-PSBreakpoint.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Get Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
Gets the breakpoints that are set in the current session.
## SYNTAX
-### Script (Default)
+### Line (Default)
```
-Get-PSBreakpoint [-Script <String[]>] [<CommonParameters>]
+Get-PSBreakpoint [[-Script] <string[]>] [<CommonParameters>]
```
-### Variable
+### Command
```
-Get-PSBreakpoint [-Script <String[]>] -Variable <String[]> [<CommonParameters>]
+Get-PSBreakpoint -Command <string[]> [-Script <string[]>] [<CommonParameters>]
```
-### Command
+### Variable
```
-Get-PSBreakpoint [-Script <String[]>] -Command <String[]> [<CommonParameters>]
+Get-PSBreakpoint -Variable <string[]> [-Script <string[]>] [<CommonParameters>]
``` ### Type ```
-Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParameters>]
+Get-PSBreakpoint [-Type] <BreakpointType[]> [-Script <string[]>] [<CommonParameters>]
``` ### Id ```
-Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>]
+Get-PSBreakpoint [-Id] <int[]> [<CommonParameters>]
```
-## DESCRIPTION
+## Description
-The **Get-PSBreakPoint** cmdlet gets the breakpoints that are set in the current session.
-You can use the cmdlet parameters to get particular breakpoints.
+The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use
+the cmdlet parameters to get particular breakpoints.
A breakpoint is a point in a command or script where execution stops temporarily so that you can
-examine the instructions.
-**Get-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts and
-commands. For more information about the PowerShell debugger, see about_Debuggers.
+examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts and commands. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Get all breakpoints for all scripts and functions
-```
-PS C:\> Get-PSBreakpoint
-```
- This command gets all breakpoints set on all scripts and functions in the current session.
-### Example 2: Get breakpoints by ID
-
-```
-PS C:\> Get-PSBreakpoint -Id 2
-Function :
-IncrementAction :
-Enabled :
-TrueHitCount : 0
-Id : 2
-Script : C:\ps-test\sample.ps1
-ScriptName : C:\ps-test\sample.ps1
+```powershell
+Get-PSBreakpoint
```
-This command gets the breakpoint with breakpoint ID 2.
+### Example 2: Get breakpoints by ID
-### Example 3: Pipe an ID to Get-PSBreakpoint
+This command gets the breakpoint with breakpoint ID 2.
+```powershell
+Get-PSBreakpoint -Id 2
```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Command "Increment"
-PS C:\> $B.Id | Get-PSBreakpoint
+
+```Output
+Function :
+IncrementAction :
+Enabled :
+TrueHitCount : 0
+Id : 2
+Script : C:\ps-test\sample.ps1
+ScriptName : C:\ps-test\sample.ps1
```
-These commands show how to get a breakpoint by piping a breakpoint ID to **Get-PSBreakpoint**.
+### Example 3: Pipe an ID to `Get-PSBreakpoint`
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Increment function
-in the Sample.ps1 script. It saves the breakpoint object in the $B variable.
+These commands show how to get a breakpoint by piping a breakpoint ID to `Get-PSBreakpoint`.
-The second command uses the dot operator (.) to get the Id property of the breakpoint object in the
-$B variable. It uses a pipeline operator (|) to send the ID to the **Get-PSBreakpoint** cmdlet.
+```powershell
+$B = `Set-PSBreakpoint` -Script "sample.ps1" -Command "Increment"
+$B.Id | Get-PSBreakpoint
+```
-As a result, **Get-PSBreakpoint** gets the breakpoint with the specified ID.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the Increment function in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The **Id** property of the breakpoint
+object in the `$B` variable is piped to the `Get-PSBreakpoint` cmdlet to display the breakpoint
+information.
### Example 4: Get breakpoints in specified script files
-```
-PS C:\> Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
-```
+This command gets all of the breakpoints in the `Sample.ps1` and `SupportScript.ps1` files.
-This command gets all of the breakpoints in the Sample.ps1 and SupportScript.ps1 files.
+```powershell
+Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
+```
This command does not get other breakpoints that might be set in other scripts or on functions in the session. ### Example 5: Get breakpoints in specified cmdlets
-```
-PS C:\> Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
-```
+This command gets all Command breakpoints that are set on `Read-Host` or `Write-Host` commands in
+the `Sample.ps1` file.
-This command gets all Command breakpoints that are set on Read-Host or Write-Host commands in the
-Sample.ps1 file.
+```powershell
+Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
+```
### Example 6: Get Command breakpoints in a specified file
-```
-PS C:\> Get-PSBreakpoint -Type Command -Script "Sample.ps1"
+```powershell
+Get-PSBreakpoint -Type Command -Script "Sample.ps1"
``` This command gets all Command breakpoints in the Sample.ps1 file. ### Example 7: Get breakpoints by variable
-```
-PS C:\> Get-PSBreakpoint -Variable "Index, Swap"
-```
+This command gets breakpoints that are set on the `$Index` and `$Swap` variables in the current
+session.
-This command gets breakpoints that are set on the $Index and $Swap variables in the current session.
+```powershell
+Get-PSBreakpoint -Variable "Index, Swap"
+```
### Example 8: Get all Line and Variable breakpoints in a file
-```
-PS C:\> Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
-```
+This command gets all line and variable breakpoints in the `Sample.ps1` script.
-This command gets all line and variable breakpoints in the Sample.ps1 script.
+```powershell
+Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
+```
-## PARAMETERS
+## Parameters
### -Command
-Specifies an array of command breakpoints that are set on the specified command names.
-Enter the command names, such as the name of a cmdlet or function.
+Specifies an array of command breakpoints that are set on the specified command names. Enter the
+command names, such as the name of a cmdlet or function.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Id
-Specifies the breakpoint IDs that this cmdlet gets.
-Enter the IDs in a comma-separated list.
-You can also pipe breakpoint IDs to **Get-PSBreakpoint**.
+Specifies the breakpoint IDs that this cmdlet gets. Enter the IDs in a comma-separated list. You can
+also pipe breakpoint IDs to `Get-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
### -Script
-Specifies an array of scripts that contain the breakpoints.
-Enter the path (optional) and names of one or more script files.
-If you omit the path, the default location is the current directory.
+Specifies an array of scripts that contain the breakpoints. Enter the path (optional) and names of
+one or more script files. If you omit the path, the default location is the current directory.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Type
-Specifies an array of breakpoint types that this cmdlet gets.
-Enter one or more types.
-The acceptable values for this parameter are:
+Specifies an array of breakpoint types that this cmdlet gets. Enter one or more types. The
+acceptable values for this parameter are:
- Line - Command - Variable
-You can also pipe breakpoint types to **Get-PSBreakPoint**.
+You can also pipe breakpoint types to `Get-PSBreakPoint`.
```yaml Type: Microsoft.PowerShell.Commands.BreakpointType[]
Accept wildcard characters: False
### -Variable
-Specifies an array of variable breakpoints that are set on the specified variable names.
-Enter the variable names without dollar signs.
+Specifies an array of variable breakpoints that are set on the specified variable names. Enter the
+variable names without dollar signs.
```yaml Type: System.String[]
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see about_CommonParameters
-(https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
-## INPUTS
+### System.Int32
-### System.Int32, Microsoft.PowerShell.Commands.BreakpointType
+### Microsoft.PowerShell.Commands.BreakpointType
-You can pipe breakpoint IDs and breakpoint types to **Get-PSBreakPoint**.
+You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## OUTPUTS
+## Outputs
+
+### System.Management.Automation.CommandBreakpoint
+
+### System.Management.Automation.LineBreakpoint
+
+### System.Management.Automation.VariableBreakpoint
### System.Management.Automation.Breakpoint
-**Get-PSBreakPoint** returns objects that represent the breakpoints in the session.
+`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## NOTES
+## Notes
-* You can use **Get-PSBreakpoint** or its alias, "gbp".
+You can use `Get-PSBreakpoint` or its alias, "gbp".
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
You can pipe breakpoint IDs and breakpoint types to **Get-PSBreakPoint**.
[Remove-PSBreakpoint](Remove-PSBreakpoint.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/remove-psbreakpoint?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Remove-PSBreakpoint
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Deletes breakpoints from the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Remove-PSBreakpoint** cmdlet deletes a breakpoint.
-Enter a breakpoint object or a breakpoint ID.
+## Description
-When you remove a breakpoint, the breakpoint object is no longer available or functional.
-If you have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does not function.
+The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
-**Remove-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see about_Debuggers.
+When you remove a breakpoint, the breakpoint object is no longer available or functional. If you
+have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does
+not function.
-## EXAMPLES
+`Remove-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
+information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-### Example 1: Remove all breakpoints
+## Examples
-```
-PS C:\> Get-PSBreakpoint | Remove-PSBreakpoint
-```
+### Example 1: Remove all breakpoints
This command deletes all of the breakpoints in the current console.
-### Example 2: Remove a specified breakpoint
-
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
-PS C:\> $B | Remove-PSBreakpoint
+```powershell
+Get-PSBreakpoint | Remove-PSBreakpoint
```
+### Example 2: Remove a specified breakpoint
+ This command deletes a breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
+$B | Remove-PSBreakpoint
+```
-The second command uses the **Remove-PSBreakpoint** cmdlet to delete the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in the $B variable to the **Remove-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Remove-PSBreakpoint` cmdlet
+deletes the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in the
+`$B` variable to the `Remove-PSBreakpoint` cmdlet.
-As a result of this command, if you run the script, it runs to completion without stopping.
-Also, the **Get-PSBreakpoint** cmdlet does not return this breakpoint.
+As a result of this command, if you run the script, it runs to completion without stopping. Also,
+the `Get-PSBreakpoint` cmdlet does not return this breakpoint.
### Example 3: Remove a breakpoint by ID
-```
-PS C:\> Remove-PSBreakpoint -Id 2
-```
- This command deletes the breakpoint with breakpoint ID 2.
-### Example 4: Use a function to remove all breakpoints
-
-```
-PS C:\> function del-psb { get-psbreakpoint | remove-psbreakpoint }
+```powershell
+Remove-PSBreakpoint -Id 2
```
+### Example 4: Use a function to remove all breakpoints
+ This simple function deletes all of the breakpoints in the current console.
-It uses the Get-PSBreakpoint cmdlet to get the breakpoints.
-Then, it uses a pipeline operator (|) to send the breakpoints to the **Remove-PSBreakpoint** cmdlet, which deletes them.
-As a result, you can type `del-psb` instead of the longer command.
+```powershell
+function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
+```
-To save the function, add it to your PowerShell profile.
+It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator
+(`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## PARAMETERS
+## Parameters
### -Breakpoint
-Specifies the breakpoints to delete.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a **Get-PSBreakpoint** command.
-You can also pipe breakpoint objects to **Remove-PSBreakpoint**.
+
+Specifies the breakpoints to delete. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to `Remove-PSBreakpoint`.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
``` ### -Id+ Specifies breakpoint IDs for which this cmdlet deletes breakpoints. ```yaml
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-### System.Management.Automation.Breakpoint
-You can pipe breakpoint objects to **Remove-PSBreakpoint**.
+## Inputs
-## OUTPUTS
+### System.Management.Automation.Breakpoint[]
+
+You can pipe breakpoint objects to `Remove-PSBreakpoint`.
+
+### System.Int32[]
+
+### System.Management.Automation.Runspaces.Runspace
+
+## Outputs
### None+ The cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
The cmdlet does not generate any output.
[Get-PSCallStack](Get-PSCallStack.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Set Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/24/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-psbreakpoint?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSBreakpoint --- # Set-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Sets a breakpoint on a line, command, or variable.
-## SYNTAX
+## Syntax
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
you can use the **Action** parameter to specify an alternate response, such as c
breakpoint or instructions to perform additional tasks such as logging or diagnostics. The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+For more information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint on a line
Set-PSBreakpoint -Script Sample.ps1 -Command "write*"
### Example 5: Set a breakpoint depending on the value of a variable
-This example stops execution at the `DiskTest` function in the Test.ps1 script only when the value of
-the `$Disk` variable is greater than 2.
+This example stops execution at the `DiskTest` function in the `Test.ps1` script only when the value
+of the `$Disk` variable is greater than 2.
```powershell Set-PSBreakpoint -Script "test.ps1" -Command "DiskTest" -Action { if ($Disk -gt 2) { break } }
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## PARAMETERS
+## Parameters
### -Action
Accept wildcard characters: False
Specifies the column number of the column in the script file on which execution stops. Enter only one column number. The default is column 1.
-The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the **Line**
-parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the specified column
-on each of the specified lines. PowerShell stops executing before the statement or expression that
-includes the character at the specified line and column position.
+The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the
+**Line** parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the
+specified column on each of the specified lines. PowerShell stops executing before the statement or
+expression that includes the character at the specified line and column position.
Columns are counted from the top left margin beginning with column number 1 (not 0). If you specify a column that does not exist in the script, an error is not declared, but the breakpoint is never
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe input to `Set-PSBreakpoint`. ## OUTPUTS
-### Breakpoint object (System.Management.Automation.LineBreakpoint, System.Management.Automation.VariableBreakpoint, System.Management.Automation.CommandBreakpoint)
+### System.Management.Automation.CommandBreakpoint
+
+### System.Management.Automation.LineBreakpoint
+
+### System.Management.Automation.VariableBreakpoint
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## NOTES
+## Notes
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
PSReadLine Set Psreadlineoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSReadLine/Set-PSReadLineOption.md
--- external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: PSReadLine Previously updated : 06/30/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSReadLineOption
If you don't use this parameter, the default path is as follows:
**Windows**
-`$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
+- `$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
**non-Windows**
-`$env:XDG_DATA_HOME/powershell/PSReadLine\$($host.Name)_history.txt`
-
-`$env:HOME/.local/share/powershell/PSReadLine\$($host.Name)_history.txt`
+- `$env:XDG_DATA_HOME/powershell/PSReadLine/$($host.Name)_history.txt`
+- `$env:HOME/.local/share/powershell/PSReadLine/$($host.Name)_history.txt`
```yaml Type: System.String
Microsoft.PowerShell.Core About Environment Variables (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
--- description: Describes how to access Windows environment variables in PowerShell. Locale: en-US Previously updated : 09/22/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Environment Variables --- # about_Environment_Variables
-## SHORT DESCRIPTION
+## Short description
Describes how to access Windows environment variables in PowerShell.
-## LONG DESCRIPTION
+## Long description
Environment variables store information about the operating system environment. This information includes details such as the operating system
in the Windows Command Shell and the `Setenv` command in UNIX-based
environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class.
-To make changes to Machine-scoped variables, must also have permission. If you
-try to change a value without sufficient permission, the command fails and
+To make changes to Machine-scoped variables, you must also have permission. If
+you try to change a value without sufficient permission, the command fails and
PowerShell displays an error. You can change the values of variables without using a cmdlet using the
variable, use the following syntax:
$Env:Path += ";c:\temp" ```
-On Linux or MacOS, the colon (`:`) in the command separates the new path from
+On Linux or macOS, the colon (`:`) in the command separates the new path from
the path that precedes it in the list. ```powershell
Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp")
In this command, the value is enclosed in parentheses so that it is interpreted as a unit.
-## Environment variables that store preferences
-
-PowerShell features can use environment variables to store user preferences.
-These variables work like preference variables, but they are inherited by child
-sessions of the sessions in which they are created. For more information about
-preference variables, see [about_preference_variables](about_Preference_Variables.md).
-
-The environment variables that store preferences include:
--- PSExecutionPolicyPreference-
- Stores the execution policy set for the current session. This environment
- variable exists only when you set an execution policy for a single session.
- You can do this in two different ways.
-
- - Start a session from the command line using the **ExecutionPolicy**
- parameter to set the execution policy for the session.
-
- - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
- a value of "Process".
-
- For more information, see [about_Execution_Policies](about_Execution_Policies.md).
--- PSModuleAnalysisCachePath-
- PowerShell provides control over the file that is used to cache data about
- modules and their cmdlets. The cache is read at startup while searching for a
- command and is written on a background thread sometime after a module is
- imported.
-
- Default location of the cache is:
-
- - Windows PowerShell 5.1: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
- - PowerShell 6.0 and higher: `$env:LOCALAPPDATA\Microsoft\PowerShell`
- - Non-Windows default: `~/.cache/powershell`
-
- The default filename for the cache is `ModuleAnalysisCache`. When you have
- multiple instances of PowerShell installed, the filename includes a
- hexadecimal suffix so that there is a a unique filename per installation.
-
- > [!NOTE]
- > If command discovery isn't working correctly, for example Intellisense
- > shows commands that don't exist, you can delete the cache file. The cache
- > is recreated the next time you start PowerShell.
-
- To change the default location of the cache, set the environment variable
- before starting PowerShell. Changes to this environment variable only affect
- child processes. The value should name a full path (including filename)
- that PowerShell has permission to create and write files.
-
- To disable the file cache, set this value to an invalid location, for
- example:
-
- ```powershell
- # `NUL` here is a special device on Windows that cannot be written to,
- # on non-Windows you would use ``
- $env:PSModuleAnalysisCachePath = 'NUL'
- ```
-
- This sets the path to the **NUL** device. PowerShell can't write to the
- path but no error is returned. You can see the errors reported using a
- tracer:
-
- ```powershell
- Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
- ```
--- PSDisableModuleAnalysisCacheCleanup-
- When writing out the module analysis cache, PowerShell checks for modules
- that no longer exist to avoid an unnecessarily large cache. Sometimes these
- checks are not desirable, in which case you can turn them off by setting this
- environment variable value to `1`.
-
- Setting this environment variable takes effect immediately in the current
- process.
--- PSModulePath-
- The `$env:PSModulePath` environment variable contains a list of folder
- locations that are searched to find modules and resources.
-
- By default, the effective locations assigned to `$env:PSModulePath` are:
-
- - System-wide locations: These folders contain modules that ship with
- PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
- This is the location where the Windows management modules are installed.
-
- - User-installed modules: These are modules installed by the user.
- `Install-Module` has a **Scope** parameter that allows you to specify
- whether the module is installed for the current user or for all users. For
- more information, see [Install-Module](xref:PowerShellGet.Install-Module).
-
- - On Windows, the location of the user-specific **CurrentUser** scope is
- the `$HOME\Documents\PowerShell\Modules` folder. The location of the
- **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
- - On non-Windows systems, the location of the user-specific **CurrentUser**
- scope is the `$HOME/.local/share/powershell/Modules` folder. The location
- of the **AllUsers** scope is `/usr/local/share/powershell/Modules`.
-
- In addition, setup programs that install modules in other directories, such
- as the Program Files directory, can append their locations to the value of
- `$env:PSModulePath`.
-
- For more information, see [about_PSModulePath](about_PSModulePath.md).
- ## Managing environment variables PowerShell provides several different methods for managing environment
$newpath = $path + ';C:\Program Files\Fabrikam\Modules'
For more information about the methods of the **System.Environment** class, see [Environment Methods](/dotnet/api/system.environment).
-## SEE ALSO
+## PowerShell's environment variables
+
+PowerShell features can use environment variables to store user preferences.
+These variables work like preference variables, but they are inherited by child
+sessions of the sessions in which they are created. For more information about
+preference variables, see [about_Preference_Variables](about_preference_variables.md).
+
+The environment variables that store preferences include:
+
+- **PSExecutionPolicyPreference**
+
+ Stores the execution policy set for the current session. This environment
+ variable exists only when you set an execution policy for a single session.
+ You can do this in two different ways.
+
+ - Start a session from the command line using the **ExecutionPolicy**
+ parameter to set the execution policy for the session.
+
+ - Use the `Set-ExecutionPolicy` cmdlet. Use the Scope parameter with
+ a value of "Process".
+
+ For more information, see [about_Execution_Policies](about_Execution_Policies.md).
+
+- **PSModuleAnalysisCachePath**
+
+ PowerShell provides control over the file that is used to cache data about
+ modules and their cmdlets. The cache is read at startup while searching for a
+ command and is written on a background thread sometime after a module is
+ imported.
+
+ Default location of the cache is:
+
+ - Windows PowerShell 5.1: `$env:LOCALAPPDATA\Microsoft\Windows\PowerShell`
+ - PowerShell 6.0 and higher: `$env:LOCALAPPDATA\Microsoft\PowerShell`
+ - Non-Windows default: `~/.cache/powershell`
+
+ The default filename for the cache is `ModuleAnalysisCache`. When you have
+ multiple instances of PowerShell installed, the filename includes a
+ hexadecimal suffix so that there is a a unique filename per installation.
+
+ > [!NOTE]
+ > If command discovery isn't working correctly, for example Intellisense
+ > shows commands that don't exist, you can delete the cache file. The cache
+ > is recreated the next time you start PowerShell.
+
+ To change the default location of the cache, set the environment variable
+ before starting PowerShell. Changes to this environment variable only affect
+ child processes. The value should name a full path (including filename)
+ that PowerShell has permission to create and write files.
+
+ To disable the file cache, set this value to an invalid location, for
+ example:
+
+ ```powershell
+ # `NUL` here is a special device on Windows that cannot be written to,
+ # on non-Windows you would use ``
+ $env:PSModuleAnalysisCachePath = 'NUL'
+ ```
+
+ This sets the path to the **NUL** device. PowerShell can't write to the
+ path but no error is returned. You can see the errors reported using a
+ tracer:
+
+ ```powershell
+ Trace-Command -PSHost -Name Modules -Expression { Import-Module Microsoft.PowerShell.Management -Force }
+ ```
+
+- **PSDisableModuleAnalysisCacheCleanup**
+
+ When writing out the module analysis cache, PowerShell checks for modules
+ that no longer exist to avoid an unnecessarily large cache. Sometimes these
+ checks are not desirable, in which case you can turn them off by setting this
+ environment variable value to `1`.
+
+ Setting this environment variable takes effect immediately in the current
+ process.
+
+- **PSModulePath**
+
+ The `$env:PSModulePath` environment variable contains a list of folder
+ locations that are searched to find modules and resources.
+
+ By default, the effective locations assigned to `$env:PSModulePath` are:
+
+ - System-wide locations: These folders contain modules that ship with
+ PowerShell. The modules are store in the `$PSHOME\Modules` location. Also,
+ This is the location where the Windows management modules are installed.
+
+ - User-installed modules: These are modules installed by the user.
+ `Install-Module` has a **Scope** parameter that allows you to specify
+ whether the module is installed for the current user or for all users. For
+ more information, see [Install-Module](xref:PowerShellGet.Install-Module).
+
+ - On Windows, the location of the user-specific **CurrentUser** scope is
+ the `$HOME\Documents\PowerShell\Modules` folder. The location of the
+ **AllUsers** scope is `$env:ProgramFiles\PowerShell\Modules`.
+ - On non-Windows systems, the location of the user-specific **CurrentUser**
+ scope is the `$HOME/.local/share/powershell/Modules` folder. The location
+ of the **AllUsers** scope is `/usr/local/share/powershell/Modules`.
+
+ In addition, setup programs that install modules in other directories, such
+ as the Program Files directory, can append their locations to the value of
+ `$env:PSModulePath`.
+
+ For more information, see [about_PSModulePath](about_PSModulePath.md).
+
+- **POWERSHELL_UPDATECHECK**
+
+ The update notification behavior can be changed using the
+ `POWERSHELL_UPDATECHECK` environment variable. The following values are
+ supported:
+
+ - `Off` turns off the update notification feature
+ - `Default` is the same as not defining `POWERSHELL_UPDATECHECK`:
+ - GA releases notify of updates to GA releases
+ - Preview/RC releases notify of updates to GA and preview releases
+ - `LTS` only notifies of updates to long-term-servicing (LTS) GA releases
+
+ For more information, see [about_Update_Notifications](about_Update_Notifications.md).
+
+- **POWERSHELL_TELEMETRY_OPTOUT**
+
+ To opt-out of telemetry, set the environment variable to `true`, `yes`, or `1`.
+
+ For more information, see [about_Telemetry](about_Telemetry.md).
+
+- **POWERSHELL_DISTRIBUTION_CHANNEL**
+
+ Beginning in PowerShell 7.2, this environment variable is set by the
+ installer packages to record the method and source of installation for
+ PowerShell.
+
+## Third-party environment variables
+
+On non-Windows platforms, PowerShell uses the following XDG environment
+variables as defined by the [XDG Base Directory Specification][xdg-bds].
+
+- **XDG_CONFIG_HOME**
+- **XDG_DATA_HOME**
+- **XDG_CACHE_HOME**
+
+Beginning in PowerShell 7.2, the following environment variables can be used to
+control the Virtual Terminal features like ANSI escape sequences that colorize
+output. Support for ANSI escape sequences can be turned off using the **TERM**
+or **NO_COLOR** environment variables.
+
+- **TERM**
+
+ The following values of `$env:TERM` change the behavior as follows:
+
+ - `dumb` - sets `$Host.UI.SupportsVirtualTerminal = $false`
+ - `xterm-mono` - sets `$PSStyle.OutputRendering = PlainText`
+ - `xtermm` - sets `$PSStyle.OutputRendering = PlainText`
+
+- **NO_COLOR**
+
+ If `$env:NO_COLOR` exists, then `$PSStyle.OutputRendering` is set to
+ **PlainText**. For more information about the **NO_COLOR** environment
+ variable, see [https://no-color.org/](https://no-color.org/).
+
+## See also
- [Environment (provider)](../About/about_Environment_Provider.md) - [about_Modules](about_Modules.md)
+[xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Microsoft.PowerShell.Core Debug Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Debug-Job.md
external help file: System.Management.Automation.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Core Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/debug-job?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Job
Title: Debug-Job
# Debug-Job
-## SYNOPSIS
-Debugs a running background, remote, or PowerShell Workflow job.
+## Synopsis
+Debugs a running background or remote job.
-## SYNTAX
+## Syntax
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
-The **Debug-Job** cmdlet lets you debug scripts that are running within jobs.
-The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions.
-**Debug-Job** accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on the script it is running.
-The debugger **quit** command stops the job and running script.
-Starting in Windows PowerShell 5.0, the **exit** command detaches the debugger, and allows the job to continue to run.
+## Description
-## EXAMPLES
+The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed
+to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
+accepts a running job object, name, ID, or instance ID as input, and starts a debugging session on
+the script it is running. The debugger `quit` command stops the job and running script. The `exit`
+command detaches the debugger, and allows the job to continue to run.
+
+## Examples
### Example 1: Debug a job by job ID
+This command breaks into a running job with an ID of 3.
+
+```powershell
+Debug-Job -ID 3
```
-PS C:\> Debug-Job -ID 3
+
+```Output
Id Name PSJobTypeName State HasMoreData Location Command -- ---- ------------- ----- ----------- -------- ------- 3 Job3 RemoteJob Running True PowerShellIx TestWFDemo1.ps1
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-This command breaks into a running job with an ID of 3.
+## Parameters
-## PARAMETERS
+### -BreakAll
+
+Allows you to break immediately in the current location when the debugger attaches.
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
### -Id
-Specifies the ID number of a running job.
-To get the ID number of a job, run the Get-Job cmdlet.
+
+Specifies the ID number of a running job. To get the ID number of a job, run the `Get-Job` cmdlet.
```yaml Type: System.Int32
Accept wildcard characters: False
``` ### -InstanceId
-Specifies the instance ID GUID of a running job.
-To get the *InstanceId* of a job, run the **Get-Job** cmdlet, piping the results into a **Format-*** cmdlet, as shown in the following example:
-`Get-Job | Format-List -Property Id,Name,InstanceId,State`
+Specifies the instance ID GUID of a running job.
```yaml Type: System.Guid
Accept wildcard characters: False
``` ### -Job
-Specifies a running job object.
-The simplest way to use this parameter is to save the results of a **Get-Job** command that returns the running job that you want to debug in a variable, and then specify the variable as the value of this parameter.
+
+Specifies a running job object. The simplest way to use this parameter is to save the results of a
+`Get-Job` command that returns the running job that you want to debug in a variable, and then
+specify the variable as the value of this parameter.
```yaml Type: System.Management.Automation.Job
Accept wildcard characters: False
``` ### -Name
-Specifies a job by the friendly name of the job.
-When you start a job, you can specify a job name by adding the *JobName* parameter, in cmdlets such as Invoke-Command and Start-Job.
+
+Specifies a job by the friendly name of the job. When you start a job, you can specify a job name by
+adding the **JobName** parameter, in cmdlets such as `Invoke-Command` and `Start-Job`.
```yaml Type: System.String
Accept wildcard characters: False
``` ### -Confirm+ Prompts you for confirmation before running the cmdlet. ```yaml
Accept wildcard characters: False
``` ### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept pipeline input: False
Accept wildcard characters: False ```
-### -BreakAll
-
-{{ Fill BreakAll Description }}
-
-```yaml
-Type: System.Management.Automation.SwitchParameter
-Parameter Sets: (All)
-Aliases:
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
- ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
### System.Management.Automation.RemotingJob
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Get-Job](Get-Job.md)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[Stop-Job](Stop-Job.md) [Wait-Job](Wait-Job.md)-
Microsoft.PowerShell.Utility Debug Runspace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Debug-Runspace.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/debug-runspace?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Debug-Runspace --- # Debug-Runspace
-## SYNOPSIS
+## Synopsis
Starts an interactive debugging session with a runspace.
-## SYNTAX
+## Syntax
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters
Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## EXAMPLES
+## Examples
### Example 1: Debug a remote runspace
-```
+In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
+first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
+PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
+PowerShell ISE host process.
+
+```powershell
PS C:\> Get-Process -ComputerName "WS10TestServer" -Name "*powershell*" Handles WS(K) VM(M) CPU(s) Id ProcessName
Id Name ComputerName Type State Availability
1 Runspace1 WS10TestServer Remote Opened Available 2 RemoteHost WS10TestServer Remote Opened Busy
-PS C:\> [WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
+[WS10TestServer][Process:1152]: PS C:\Users\Test\Documents> Debug-Runspace -Id 2
Hit Line breakpoint on 'C:\TestWFVar1.ps1:83' At C:\TestWFVar1.ps1:83 char:1
At C:\TestWFVar1.ps1:83 char:1
[Process:1152]: [RSDBG: 2]: PS C:\> > ```
-In this example, you debug a runspace that is open on a remote computer, WS10TestServer. In the
-first line of the command, you run `Get-Process` on the remote computer, and filter for Windows
-PowerShell host processes. In this example, you want to debug process ID 1152, the Windows
-PowerShell ISE host process.
- In the second command, you run `Enter-PSSession` to open a remote session on WS10TestServer. In the third command, you attach to the Windows PowerShell ISE host process running on the remote server by running `Enter-PSHostProcess`, and specifying the ID of the host process that you obtained in the
In the fourth command, you list available runspaces for process ID 1152 by runni
You note the ID number of the Busy runspace; it is running a script that you want to debug. In the last command, you start debugging an opened runspace that is running a script,
-TestWFVar1.ps1, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
+`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding
the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## PARAMETERS
+## Parameters
+
+### -BreakAll
+
+Allows you to break immediately in the current location when the debugger attaches.
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
### -Id
Accept pipeline input: False
Accept wildcard characters: False ```
-### -BreakAll
-
-{{ Fill BreakAll Description }}
-
-```yaml
-Type: System.Management.Automation.SwitchParameter
-Parameter Sets: (All)
-Aliases:
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
- ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## OUTPUTS
+## Outputs
-## NOTES
+## Notes
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## RELATED LINKS
+## Related links
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
added to the running list only if it meets the following criteria.
[Enter-PSHostProcess](../Microsoft.PowerShell.Core/Enter-PSHostProcess.md) [Enter-PSSession](../Microsoft.PowerShell.Core/Enter-PSSession.md)-
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/disable-psbreakpoint?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Disable-PSBreakpoint --- # Disable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Disables the breakpoints in the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default) ```
-Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
+ [<CommonParameters>]
``` ### Id ```
-Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf] [-Confirm]
+ [<CommonParameters>]
```
-## DESCRIPTION
+## Description
-The **Disable-PSBreakpoint** cmdlet disables breakpoints, which assures that they are not hit when the script runs.
-You can use it to disable all breakpoints, or you can specify breakpoints by submitting breakpoint objects or breakpoint IDs.
+The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the
+script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
+breakpoint objects or breakpoint IDs.
Technically, this cmdlet changes the value of the Enabled property of a breakpoint object to False.
-To re-enable a breakpoint, use the Enable-PSBreakpoint cmdlet.
-Breakpoints are enabled by default when you create them by using the Set-PSBreakpoint cmdlet.
+To re-enable a breakpoint, use the `Enable-PSBreakpoint` cmdlet. Breakpoints are enabled by default
+when you create them using the `Set-PSBreakpoint` cmdlet.
-A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script.
-**Disable-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see about_Debuggers.
+A breakpoint is a point in a script where execution stops temporarily so that you can examine the
+instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint and disable it
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
-PS C:\> $B | Disable-PSBreakpoint
-```
- These commands disable a newly-created breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the *Name* variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "name"
+$B | Disable-PSBreakpoint
+```
-The second command uses the **Disable-PSBreakpoint** cmdlet to disable the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in $B to the **Disable-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Disable-PSBreakpoint` cmdlet
+disables the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in `$B`
+to the `Disable-PSBreakpoint` cmdlet.
-As a result of this command, the value of the Enabled property of the breakpoint object in $B is False.
+As a result of this command, the value of the **Enabled** property of the breakpoint object in `$B`
+is **False**.
### Example 2: Disable a breakpoint
-```
-PS C:\> Disable-PSBreakpoint -Id 0
-```
- This command disables the breakpoint with breakpoint ID 0.
-### Example 3: Create a disabled breakpoint
-
-```
-PS C:\> Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
-PS C:\> $B
+```powershell
+Disable-PSBreakpoint -Id 0
```
+### Example 3: Create a disabled breakpoint
+ This command creates a new breakpoint that is disabled until you enable it.
-It uses the **Disable-PSBreakpoint** cmdlet to disable the breakpoint.
-The value of the *Breakpoint* parameter is a Set-PSBreakpoint command that sets a new breakpoint, generates a breakpoint object, and saves the object in the $B variable.
+```powershell
+Disable-PSBreakpoint -Breakpoint ($B = Set-PSBreakpoint -Script "sample.ps1" -Line 5)
+```
-Cmdlet parameters that take objects as their values can accept a variable that contains the object or a command that gets or generates the object.
-In this case, because **Set-PSBreakpoint** generates a breakpoint object, it can be used as the value of the *Breakpoint* parameter.
+It uses the `Disable-PSBreakpoint` cmdlet to disable the breakpoint. The value of the **Breakpoint**
+parameter is a `Set-PSBreakpoint` command that sets a new breakpoint, generates a breakpoint object,
+and saves the object in the `$B` variable.
-The second command displays the breakpoint object in the value of the $B variable.
+Cmdlet parameters that take objects as their values can accept a variable that contains the object
+or a command that gets or generates the object. In this case, because `Set-PSBreakpoint` generates a
+breakpoint object, it can be used as the value of the **Breakpoint** parameter.
### Example 4: Disable all breakpoints in the current console
-```
-PS C:\> Get-PSBreakpoint | Disable-PSBreakpoint
-```
- This command disables all breakpoints in the current console.
-You can abbreviate this command as: "gbp | dbp".
-## PARAMETERS
+```powershell
+`Get-PSBreakpoint` | Disable-PSBreakpoint
+```
+
+## Parameters
### -Breakpoint
-Specifies the breakpoints to disable.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command.
-You can also pipe breakpoint objects to the **Disable-PSBreakpoint** cmdlet.
+Specifies the breakpoints to disable. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to the `Disable-PSBreakpoint` cmdlet.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
### -Id
-Disables the breakpoints with the specified breakpoint IDs.
-Enter the IDs or a variable that contains the IDs.
-You cannot pipe IDs to **Disable-PSBreakpoint**.
+Disables the breakpoints with the specified breakpoint IDs. Enter the IDs or a variable that
+contains the IDs. You cannot pipe IDs to `Disable-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept wildcard characters: False
### -PassThru
-Returns an object representing the enabled breakpoints.
-By default, this cmdlet does not generate any output.
+Returns an object representing the enabled breakpoints. By default, this cmdlet does not generate
+any output.
```yaml Type: System.Management.Automation.SwitchParameter
Accept pipeline input: False
Accept wildcard characters: False ```
+### -Runspace
+
+Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified
+runspace.
+
+```yaml
+Type: Runspace
+Parameter Sets: Id
+Aliases: RunspaceId
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+ ### -Confirm Prompts you for confirmation before running the cmdlet.
Accept wildcard characters: False
### -WhatIf
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: System.Management.Automation.SwitchParameter
Accept wildcard characters: False
### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint
-You can pipe a breakpoint object to **Disable-PSBreakpoint**.
+You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the *PassThru* parameter, **Disable-PSBreakpoint** returns an object that represents the disabled breakpoint.
-Otherwise, this cmdlet does not generate any output.
+When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents
+the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Otherwise, this cmdlet does not generate any output.
[Remove-PSBreakpoint](Remove-PSBreakpoint.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 10/09/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/enable-psbreakpoint?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Enable-PSBreakpoint
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Enables the breakpoints in the current console.
-## SYNTAX
+## Syntax
-### Id (Default)
+### Breakpoint (Default)
```
-Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
+ [<CommonParameters>]
```
-### Breakpoint
+### Id
```
-Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm]
+Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf] [-Confirm]
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
**True**. `Enable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
-information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## PARAMETERS
+## Parameters
### -Breakpoint
Accept pipeline input: False
Accept wildcard characters: False ```
+### -Runspace
+
+Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified
+runspace.
+
+```yaml
+Type: Runspace
+Parameter Sets: Id
+Aliases: RunspaceId
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+ ### -Confirm Prompts you for confirmation before running the cmdlet.
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.Breakpoint
-When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
+When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that
+represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## NOTES
+## Notes
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpo
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpo
[Remove-PSBreakpoint](Remove-PSBreakpoint.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Get Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 05/15/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/get-psbreakpoint?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Get-PSBreakpoint --- # Get-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Gets the breakpoints that are set in the current session.
-## SYNTAX
+## Syntax
-### Script (Default)
+### Line (Default)
```
-Get-PSBreakpoint [-Script <String[]>] [<CommonParameters>]
+Get-PSBreakpoint [[-Script] <String[]>] [-Runspace <Runspace>] [<CommonParameters>]
```
-### Variable
+### Command
```
-Get-PSBreakpoint [-Script <String[]>] -Variable <String[]> [<CommonParameters>]
+Get-PSBreakpoint [[-Script] <String[]>] -Command <String[]> [-Runspace <Runspace>] [<CommonParameters>]
```
-### Command
+### Variable
```
-Get-PSBreakpoint [-Script <String[]>] -Command <String[]> [<CommonParameters>]
+Get-PSBreakpoint [[-Script] <String[]>] -Variable <String[]> [-Runspace <Runspace>] [<CommonParameters>]
``` ### Type ```
-Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParameters>]
+Get-PSBreakpoint [[-Script] <String[]>] [-Type] <BreakpointType[]> [-Runspace <Runspace>] [<CommonParameters>]
``` ### Id ```
-Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>]
+Get-PSBreakpoint [-Id] <Int32[]> [-Runspace <Runspace>] [<CommonParameters>]
```
-## DESCRIPTION
+## Description
-The **Get-PSBreakPoint** cmdlet gets the breakpoints that are set in the current session.
-You can use the cmdlet parameters to get particular breakpoints.
+The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use
+the cmdlet parameters to get particular breakpoints.
A breakpoint is a point in a command or script where execution stops temporarily so that you can
-examine the instructions.
-**Get-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts and
-commands. For more information about the PowerShell debugger, see about_Debuggers.
+examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed for debugging
+PowerShell scripts and commands. For more information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Get all breakpoints for all scripts and functions
-```
-PS C:\> Get-PSBreakpoint
-```
- This command gets all breakpoints set on all scripts and functions in the current session.
-### Example 2: Get breakpoints by ID
-
-```
-PS C:\> Get-PSBreakpoint -Id 2
-Function :
-IncrementAction :
-Enabled :
-TrueHitCount : 0
-Id : 2
-Script : C:\ps-test\sample.ps1
-ScriptName : C:\ps-test\sample.ps1
+```powershell
+Get-PSBreakpoint
```
-This command gets the breakpoint with breakpoint ID 2.
+### Example 2: Get breakpoints by ID
-### Example 3: Pipe an ID to Get-PSBreakpoint
+This command gets the breakpoint with breakpoint ID 2.
+```powershell
+Get-PSBreakpoint -Id 2
```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Command "Increment"
-PS C:\> $B.Id | Get-PSBreakpoint
+
+```Output
+Function :
+IncrementAction :
+Enabled :
+TrueHitCount : 0
+Id : 2
+Script : C:\ps-test\sample.ps1
+ScriptName : C:\ps-test\sample.ps1
```
-These commands show how to get a breakpoint by piping a breakpoint ID to **Get-PSBreakpoint**.
+### Example 3: Pipe an ID to `Get-PSBreakpoint`
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Increment function
-in the Sample.ps1 script. It saves the breakpoint object in the $B variable.
+These commands show how to get a breakpoint by piping a breakpoint ID to `Get-PSBreakpoint`.
-The second command uses the dot operator (.) to get the Id property of the breakpoint object in the
-$B variable. It uses a pipeline operator (|) to send the ID to the **Get-PSBreakpoint** cmdlet.
+```powershell
+$B = `Set-PSBreakpoint` -Script "sample.ps1" -Command "Increment"
+$B.Id | Get-PSBreakpoint
+```
-As a result, **Get-PSBreakpoint** gets the breakpoint with the specified ID.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the Increment function in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The **Id** property of the breakpoint
+object in the `$B` variable is piped to the `Get-PSBreakpoint` cmdlet to display the breakpoint
+information.
### Example 4: Get breakpoints in specified script files
-```
-PS C:\> Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
-```
+This command gets all of the breakpoints in the `Sample.ps1` and `SupportScript.ps1` files.
-This command gets all of the breakpoints in the Sample.ps1 and SupportScript.ps1 files.
+```powershell
+Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"
+```
This command does not get other breakpoints that might be set in other scripts or on functions in the session. ### Example 5: Get breakpoints in specified cmdlets
-```
-PS C:\> Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
-```
+This command gets all Command breakpoints that are set on `Read-Host` or `Write-Host` commands in
+the `Sample.ps1` file.
-This command gets all Command breakpoints that are set on Read-Host or Write-Host commands in the
-Sample.ps1 file.
+```powershell
+Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"
+```
### Example 6: Get Command breakpoints in a specified file
-```
-PS C:\> Get-PSBreakpoint -Type Command -Script "Sample.ps1"
+```powershell
+Get-PSBreakpoint -Type Command -Script "Sample.ps1"
``` This command gets all Command breakpoints in the Sample.ps1 file. ### Example 7: Get breakpoints by variable
-```
-PS C:\> Get-PSBreakpoint -Variable "Index, Swap"
-```
+This command gets breakpoints that are set on the `$Index` and `$Swap` variables in the current
+session.
-This command gets breakpoints that are set on the $Index and $Swap variables in the current session.
+```powershell
+Get-PSBreakpoint -Variable "Index, Swap"
+```
### Example 8: Get all Line and Variable breakpoints in a file
-```
-PS C:\> Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
-```
+This command gets all line and variable breakpoints in the `Sample.ps1` script.
-This command gets all line and variable breakpoints in the Sample.ps1 script.
+```powershell
+Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"
+```
-## PARAMETERS
+## Parameters
### -Command
-Specifies an array of command breakpoints that are set on the specified command names.
-Enter the command names, such as the name of a cmdlet or function.
+Specifies an array of command breakpoints that are set on the specified command names. Enter the
+command names, such as the name of a cmdlet or function.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Id
-Specifies the breakpoint IDs that this cmdlet gets.
-Enter the IDs in a comma-separated list.
-You can also pipe breakpoint IDs to **Get-PSBreakpoint**.
+Specifies the breakpoint IDs that this cmdlet gets. Enter the IDs in a comma-separated list. You can
+also pipe breakpoint IDs to `Get-PSBreakpoint`.
```yaml Type: System.Int32[]
Accept pipeline input: True (ByValue)
Accept wildcard characters: False ```
+### -Runspace
+
+Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified
+runspace.
+
+```yaml
+Type: Runspace
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+ ### -Script
-Specifies an array of scripts that contain the breakpoints.
-Enter the path (optional) and names of one or more script files.
-If you omit the path, the default location is the current directory.
+Specifies an array of scripts that contain the breakpoints. Enter the path (optional) and names of
+one or more script files. If you omit the path, the default location is the current directory.
```yaml Type: System.String[]
Accept wildcard characters: False
### -Type
-Specifies an array of breakpoint types that this cmdlet gets.
-Enter one or more types.
-The acceptable values for this parameter are:
+Specifies an array of breakpoint types that this cmdlet gets. Enter one or more types. The
+acceptable values for this parameter are:
- Line - Command - Variable
-You can also pipe breakpoint types to **Get-PSBreakPoint**.
+You can also pipe breakpoint types to `Get-PSBreakPoint`.
```yaml Type: Microsoft.PowerShell.Commands.BreakpointType[]
Accept wildcard characters: False
### -Variable
-Specifies an array of variable breakpoints that are set on the specified variable names.
-Enter the variable names without dollar signs.
+Specifies an array of variable breakpoints that are set on the specified variable names. Enter the
+variable names without dollar signs.
```yaml Type: System.String[]
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see about_CommonParameters
-(https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
-### System.Int32, Microsoft.PowerShell.Commands.BreakpointType
+### System.Int32
-You can pipe breakpoint IDs and breakpoint types to **Get-PSBreakPoint**.
+### Microsoft.PowerShell.Commands.BreakpointType
-## OUTPUTS
+You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
+
+## Outputs
+
+### System.Management.Automation.CommandBreakpoint
+
+### System.Management.Automation.LineBreakpoint
+
+### System.Management.Automation.VariableBreakpoint
### System.Management.Automation.Breakpoint
-**Get-PSBreakPoint** returns objects that represent the breakpoints in the session.
+`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## NOTES
+## Notes
-* You can use **Get-PSBreakpoint** or its alias, "gbp".
+You can use `Get-PSBreakpoint` or its alias, "gbp".
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
You can pipe breakpoint IDs and breakpoint types to **Get-PSBreakPoint**.
[Remove-PSBreakpoint](Remove-PSBreakpoint.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/remove-psbreakpoint?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Remove-PSBreakpoint
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Deletes breakpoints from the current console.
-## SYNTAX
+## Syntax
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
### Id ```
-Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
+Remove-PSBreakpoint [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
-## DESCRIPTION
-The **Remove-PSBreakpoint** cmdlet deletes a breakpoint.
-Enter a breakpoint object or a breakpoint ID.
+## Description
-When you remove a breakpoint, the breakpoint object is no longer available or functional.
-If you have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does not function.
+The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
-**Remove-PSBreakpoint** is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see about_Debuggers.
+When you remove a breakpoint, the breakpoint object is no longer available or functional. If you
+have saved a breakpoint object in a variable, the reference still exists, but the breakpoint does
+not function.
-## EXAMPLES
+`Remove-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more
+information about the PowerShell debugger, see
+[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-### Example 1: Remove all breakpoints
+## Examples
-```
-PS C:\> Get-PSBreakpoint | Remove-PSBreakpoint
-```
+### Example 1: Remove all breakpoints
This command deletes all of the breakpoints in the current console.
-### Example 2: Remove a specified breakpoint
-
-```
-PS C:\> $B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
-PS C:\> $B | Remove-PSBreakpoint
+```powershell
+Get-PSBreakpoint | Remove-PSBreakpoint
```
+### Example 2: Remove a specified breakpoint
+ This command deletes a breakpoint.
-The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script.
-Then, it saves the breakpoint object in the $B variable.
+```powershell
+$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
+$B | Remove-PSBreakpoint
+```
-The second command uses the **Remove-PSBreakpoint** cmdlet to delete the new breakpoint.
-It uses a pipeline operator (|) to send the breakpoint object in the $B variable to the **Remove-PSBreakpoint** cmdlet.
+The `Set-PSBreakpoint` cmdlet creates a breakpoint on the `$Name` variable in the `Sample.ps1`
+script and saves the breakpoint object in the `$B` variable. The `Remove-PSBreakpoint` cmdlet
+deletes the new breakpoint. It uses a pipeline operator (`|`) to send the breakpoint object in the
+`$B` variable to the `Remove-PSBreakpoint` cmdlet.
-As a result of this command, if you run the script, it runs to completion without stopping.
-Also, the **Get-PSBreakpoint** cmdlet does not return this breakpoint.
+As a result of this command, if you run the script, it runs to completion without stopping. Also,
+the `Get-PSBreakpoint` cmdlet does not return this breakpoint.
### Example 3: Remove a breakpoint by ID
-```
-PS C:\> Remove-PSBreakpoint -Id 2
-```
- This command deletes the breakpoint with breakpoint ID 2.
-### Example 4: Use a function to remove all breakpoints
-
-```
-PS C:\> function del-psb { get-psbreakpoint | remove-psbreakpoint }
+```powershell
+Remove-PSBreakpoint -Id 2
```
+### Example 4: Use a function to remove all breakpoints
+ This simple function deletes all of the breakpoints in the current console.
-It uses the Get-PSBreakpoint cmdlet to get the breakpoints.
-Then, it uses a pipeline operator (|) to send the breakpoints to the **Remove-PSBreakpoint** cmdlet, which deletes them.
-As a result, you can type `del-psb` instead of the longer command.
+```powershell
+function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
+```
-To save the function, add it to your PowerShell profile.
+It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator
+(`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## PARAMETERS
+## Parameters
### -Breakpoint
-Specifies the breakpoints to delete.
-Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a **Get-PSBreakpoint** command.
-You can also pipe breakpoint objects to **Remove-PSBreakpoint**.
+
+Specifies the breakpoints to delete. Enter a variable that contains breakpoint objects or a command
+that gets breakpoint objects, such as a `Get-PSBreakpoint` command. You can also pipe breakpoint
+objects to `Remove-PSBreakpoint`.
```yaml Type: System.Management.Automation.Breakpoint[]
Accept wildcard characters: False
``` ### -Id+ Specifies breakpoint IDs for which this cmdlet deletes breakpoints. ```yaml
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False ```
+### -Runspace
+
+Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified
+runspace.
+
+```yaml
+Type: Runspace
+Parameter Sets: Id
+Aliases: RunspaceId
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+ ### -Confirm Prompts you for confirmation before running the cmdlet.
Accept wildcard characters: False
``` ### CommonParameters
-This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
+-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+
+## Inputs
+
+### System.Management.Automation.Breakpoint[]
-### System.Management.Automation.Breakpoint
-You can pipe breakpoint objects to **Remove-PSBreakpoint**.
+You can pipe breakpoint objects to `Remove-PSBreakpoint`.
-## OUTPUTS
+### System.Int32[]
+
+### System.Management.Automation.Runspaces.Runspace
+
+## Outputs
### None+ The cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
The cmdlet does not generate any output.
[Get-PSCallStack](Get-PSCallStack.md) [Set-PSBreakpoint](Set-PSBreakpoint.md)-
Microsoft.PowerShell.Utility Set Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/24/2019 Last updated : 08/19/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-psbreakpoint?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSBreakpoint --- # Set-PSBreakpoint
-## SYNOPSIS
+## Synopsis
Sets a breakpoint on a line, command, or variable.
-## SYNTAX
+## Syntax
### Line (Default) ``` Set-PSBreakpoint [-Action <ScriptBlock>] [[-Column] <Int32>] [-Line] <Int32[]> [-Script] <String[]>
- [<CommonParameters>]
+ [-Runspace <Runspace>] [<CommonParameters>]
``` ### Command ```
-Set-PSBreakpoint [-Action <ScriptBlock>] -Command <String[]> [[-Script] <String[]>] [<CommonParameters>]
+Set-PSBreakpoint [-Action <ScriptBlock>] -Command <String[]> [[-Script] <String[]>] [-Runspace <Runspace>]
+ [<CommonParameters>]
``` ### Variable ``` Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <String[]>
- [-Mode <VariableAccessMode>] [<CommonParameters>]
+ [-Mode <VariableAccessMode>] [-Runspace <Runspace>] [<CommonParameters>]
```
-## DESCRIPTION
+## Description
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
you can use the **Action** parameter to specify an alternate response, such as c
breakpoint or instructions to perform additional tasks such as logging or diagnostics. The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging PowerShell scripts.
-For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
+For more information about the PowerShell debugger, see
+[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## EXAMPLES
+## Examples
### Example 1: Set a breakpoint on a line
Set-PSBreakpoint -Script Sample.ps1 -Command "write*"
### Example 5: Set a breakpoint depending on the value of a variable
-This example stops execution at the `DiskTest` function in the Test.ps1 script only when the value of
-the `$Disk` variable is greater than 2.
+This example stops execution at the `DiskTest` function in the `Test.ps1` script only when the value
+of the `$Disk` variable is greater than 2.
```powershell Set-PSBreakpoint -Script "test.ps1" -Command "DiskTest" -Action { if ($Disk -gt 2) { break } }
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## PARAMETERS
+## Parameters
### -Action
Accept wildcard characters: False
Specifies the column number of the column in the script file on which execution stops. Enter only one column number. The default is column 1.
-The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the **Line**
-parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the specified column
-on each of the specified lines. PowerShell stops executing before the statement or expression that
-includes the character at the specified line and column position.
+The Column value is used with the value of the **Line** parameter to specify the breakpoint. If the
+**Line** parameter specifies multiple lines, the **Column** parameter sets a breakpoint at the
+specified column on each of the specified lines. PowerShell stops executing before the statement or
+expression that includes the character at the specified line and column position.
Columns are counted from the top left margin beginning with column number 1 (not 0). If you specify a column that does not exist in the script, an error is not declared, but the breakpoint is never
Accept pipeline input: False
Accept wildcard characters: False ```
+### -Runspace
+{{ Fill Runspace Description }}
+
+```yaml
+Type: Runspace
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+ ### -Script Specifies an array of script files that this cmdlet sets a breakpoint in. Enter the paths and file
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,--WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
+-WarningAction, and -WarningVariable. For more information, see
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### None You cannot pipe input to `Set-PSBreakpoint`. ## OUTPUTS
-### Breakpoint object (System.Management.Automation.LineBreakpoint, System.Management.Automation.VariableBreakpoint, System.Management.Automation.CommandBreakpoint)
+### System.Management.Automation.CommandBreakpoint
+
+### System.Management.Automation.LineBreakpoint
+
+### System.Management.Automation.VariableBreakpoint
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## NOTES
+## Notes
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## RELATED LINKS
+## Related links
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
You cannot pipe input to `Set-PSBreakpoint`.
[Get-PSCallStack](Get-PSCallStack.md) [Remove-PSBreakpoint](Remove-PSBreakpoint.md)-
PSReadLine Set Psreadlineoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSReadLine/Set-PSReadLineOption.md
external help file: Microsoft.PowerShell.PSReadLine2.dll-Help.xml Locale: en-US Module Name: PSReadLine Previously updated : 11/23/2020 Last updated : 08/18/2021 online version: https://docs.microsoft.com/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-PSReadLineOption ---- # Set-PSReadLineOption ## Synopsis
If you don't use this parameter, the default path is as follows:
**Windows**
-`$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
+- `$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($host.Name)_history.txt`
**non-Windows**
-`$env:XDG_DATA_HOME/powershell/PSReadLine\$($host.Name)_history.txt`
-
-`$env:HOME/.local/share/powershell/PSReadLine\$($host.Name)_history.txt`
+- `$env:XDG_DATA_HOME/powershell/PSReadLine/$($host.Name)_history.txt`
+- `$env:HOME/.local/share/powershell/PSReadLine/$($host.Name)_history.txt`
```yaml Type: System.String
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see
-[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
## Inputs
learn Experimental Features https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/learn/experimental-features.md
Legend
## Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace
+> [!NOTE]
+> This feature became mainstream in PowerShell 7.2.
+ In PowerShell 7.0, the experiment enables the **BreakAll** parameter on the `Debug-Runspace` and `Debug-Job` cmdlets to allow users to decide if they want PowerShell to break immediately in the current location when they attach a debugger.
v2.0.5 module from the PowerShell Gallery and enable the feature using `Enable-E
## PSImplicitRemotingBatching
+> [!NOTE]
+> This experimental feature was removed in PowerShell 7.2 and is no longer supported.
+ This feature examines the command typed in the shell, and if all the commands are implicit remoting proxy commands that form a simple pipeline, then the commands are batched together and invoked as a single remote pipeline.
the pipeline is the only data returned to the client. This decreases the amount
and forth between client and remote session, and also reduces the amount of object serialization and de-serialization.
-> [!NOTE]
-> This experimental feature was removed in PowerShell 7.2 and is no longer supported.
- ## PSLoadAssemblyFromNativeCode Exposes an API to allow assembly loading from native code.
learn 10 Script Modules https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/learn/ps101/10-script-modules.md
It's not necessary to use both `Export-ModuleMember` in the `.PSM1` file and the
## Summary In this chapter you've learned how to turn your functions into a script module in PowerShell. You've
-also leaned some of the best practices for creating script modules such as creating a module
+also learned some of the best practices for creating script modules such as creating a module
manifest for your script module. ## Review
whats-new Migrating From Windows Powershell 51 To Powershell 7 https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/whats-new/Migrating-from-Windows-PowerShell-51-to-PowerShell-7.md
Deploying the MSI package requires Administrator permission. The ZIP package can
user. The ZIP package is the easiest way to install PowerShell 7 for testing, before committing to a full installation.
+You may also install PowerShell 7 via the Windows Store or `winget`. For more information about both
+of these methods, see the detailed instructions in
+[Installing PowerShell on Windows](../install/installing-powershell-core-on-windows.md#install-powershell-via-the-windows-package-manager).
+ ## Using PowerShell 7 side-by-side with Windows PowerShell 5.1 PowerShell 7 is designed to coexist with Windows PowerShell 5.1. The following features ensure that