Skip to content

Commit 767014c

Browse files
authored
Add exec to built-in functions doc (#11854)
1 parent f5158c0 commit 767014c

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

reference/7.4/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the built-in functions in PowerShell.
33
Locale: en-US
4-
ms.date: 08/14/2024
4+
ms.date: 03/01/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_built-in_functions?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Built-in_Functions
@@ -84,6 +84,15 @@ This function provides a short hand way to run `New-Item -Type Directory` with
8484
your parameters. This function is only defined for Windows systems. Linux and
8585
macOS system use the native `mkdir` command.
8686

87+
## `exec`
88+
89+
Some native Unix commands shell out to run something (like ssh) and use the
90+
built-in bash command `exec` to spawn a new process that replaces the current
91+
one. PowerShell 7.3.1 adds the `exec` function to wrap the
92+
[Switch-Process](xref:Microsoft.PowerShell.Core.Switch-Process) cmdlet.
93+
`Switch-Process` calls the native Unix `execv()` function to provide similar
94+
behavior as POSIX shells.
95+
8796
## Windows drive letter functions
8897

8998
In Windows, drive mount points are associated with a drive letter like `C:`.

reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the built-in functions in PowerShell.
33
Locale: en-US
4-
ms.date: 08/14/2024
4+
ms.date: 03/01/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_built-in_functions?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Built-in_Functions
@@ -84,6 +84,15 @@ This function provides a short hand way to run `New-Item -Type Directory` with
8484
your parameters. This function is only defined for Windows systems. Linux and
8585
macOS system use the native `mkdir` command.
8686

87+
## `exec`
88+
89+
Some native Unix commands shell out to run something (like ssh) and use the
90+
built-in bash command `exec` to spawn a new process that replaces the current
91+
one. PowerShell 7.3.1 adds the `exec` function to wrap the
92+
[Switch-Process](xref:Microsoft.PowerShell.Core.Switch-Process) cmdlet.
93+
`Switch-Process` calls the native Unix `execv()` function to provide similar
94+
behavior as POSIX shells.
95+
8796
## Windows drive letter functions
8897

8998
In Windows, drive mount points are associated with a drive letter like `C:`.

reference/7.6/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the built-in functions in PowerShell.
33
Locale: en-US
4-
ms.date: 08/14/2024
4+
ms.date: 03/01/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_built-in_functions?view=powershell-7.6&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Built-in_Functions
@@ -84,6 +84,15 @@ This function provides a short hand way to run `New-Item -Type Directory` with
8484
your parameters. This function is only defined for Windows systems. Linux and
8585
macOS system use the native `mkdir` command.
8686

87+
## `exec`
88+
89+
Some native Unix commands shell out to run something (like ssh) and use the
90+
built-in bash command `exec` to spawn a new process that replaces the current
91+
one. PowerShell 7.3.1 adds the `exec` function to wrap the
92+
[Switch-Process](xref:Microsoft.PowerShell.Core.Switch-Process) cmdlet.
93+
`Switch-Process` calls the native Unix `execv()` function to provide similar
94+
behavior as POSIX shells.
95+
8796
## Windows drive letter functions
8897

8998
In Windows, drive mount points are associated with a drive letter like `C:`.

0 commit comments

Comments
 (0)