From afd0ffadc775a522ff72c73af04d8a9746f0a26d Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Sat, 1 Mar 2025 09:38:52 -0600 Subject: [PATCH] Add exec to built-in functions doc --- .../About/about_Built-in_Functions.md | 11 ++++++++++- .../About/about_Built-in_Functions.md | 11 ++++++++++- .../About/about_Built-in_Functions.md | 11 ++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md index 096a0a40b5f6..2ea8197699ce 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md @@ -1,7 +1,7 @@ --- description: Describes the built-in functions in PowerShell. Locale: en-US -ms.date: 08/14/2024 +ms.date: 03/01/2025 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 schema: 2.0.0 title: about_Built-in_Functions @@ -84,6 +84,15 @@ This function provides a short hand way to run `New-Item -Type Directory` with your parameters. This function is only defined for Windows systems. Linux and macOS system use the native `mkdir` command. +## `exec` + +Some native Unix commands shell out to run something (like ssh) and use the +built-in bash command `exec` to spawn a new process that replaces the current +one. PowerShell 7.3.1 adds the `exec` function to wrap the +[Switch-Process](xref:Microsoft.PowerShell.Core.Switch-Process) cmdlet. +`Switch-Process` calls the native Unix `execv()` function to provide similar +behavior as POSIX shells. + ## Windows drive letter functions In Windows, drive mount points are associated with a drive letter like `C:`. diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md index ff9ab9f36f44..3b7307c379dc 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md @@ -1,7 +1,7 @@ --- description: Describes the built-in functions in PowerShell. Locale: en-US -ms.date: 08/14/2024 +ms.date: 03/01/2025 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 schema: 2.0.0 title: about_Built-in_Functions @@ -84,6 +84,15 @@ This function provides a short hand way to run `New-Item -Type Directory` with your parameters. This function is only defined for Windows systems. Linux and macOS system use the native `mkdir` command. +## `exec` + +Some native Unix commands shell out to run something (like ssh) and use the +built-in bash command `exec` to spawn a new process that replaces the current +one. PowerShell 7.3.1 adds the `exec` function to wrap the +[Switch-Process](xref:Microsoft.PowerShell.Core.Switch-Process) cmdlet. +`Switch-Process` calls the native Unix `execv()` function to provide similar +behavior as POSIX shells. + ## Windows drive letter functions In Windows, drive mount points are associated with a drive letter like `C:`. diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md index 45dac7852da8..52da12171120 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md @@ -1,7 +1,7 @@ --- description: Describes the built-in functions in PowerShell. Locale: en-US -ms.date: 08/14/2024 +ms.date: 03/01/2025 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 schema: 2.0.0 title: about_Built-in_Functions @@ -84,6 +84,15 @@ This function provides a short hand way to run `New-Item -Type Directory` with your parameters. This function is only defined for Windows systems. Linux and macOS system use the native `mkdir` command. +## `exec` + +Some native Unix commands shell out to run something (like ssh) and use the +built-in bash command `exec` to spawn a new process that replaces the current +one. PowerShell 7.3.1 adds the `exec` function to wrap the +[Switch-Process](xref:Microsoft.PowerShell.Core.Switch-Process) cmdlet. +`Switch-Process` calls the native Unix `execv()` function to provide similar +behavior as POSIX shells. + ## Windows drive letter functions In Windows, drive mount points are associated with a drive letter like `C:`.