Commit Graph
2994 Commits
Author SHA1 Message Date
xtqqczze 82d59136b2 Use [initialsessionstate] type accelerator (#25912) 2025-10-24 04:54:03 +00:00
Dongbo Wang 38f9885173 Fix a regression in the API CompletionCompleters.CompleteFilename() that causes null reference exception (#26291) 2025-10-23 16:19:55 -07:00
ThioJoeandTravis Plunk 1b3a3215d2 Fix a few simple typos in comments and string outputs (#25805)
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2025-10-23 09:09:26 +05:00
Jordan Borean af26292a7a Add PSApplicationOutputEncoding variable (#21219)
Adds the $PSApplicationOutputEncoding variable that can be used to control the encoding PowerShell uses when reading the raw bytes to a string of an external application.
2025-10-21 05:13:30 +00:00
PowerShell Team Bot ae12e4cb8c Update outdated package references (#26148) 2025-10-20 16:26:48 -07:00
5661a5152f Replace fpm with native rpmbuild for RPM package generation (#26233)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-20 15:18:23 -07:00
xtqqczze a10ff105c9 Fix SA1028: Code should not contain trailing whitespace. Part 1. (#26203) 2025-10-16 12:58:28 +05:00
xtqqczze d2d0defd5f Fix CA1852: Seal internal types. Part 1 (#26205) 2025-10-16 05:23:32 +00:00
mikkas456 123b450443 Handle null reference exception in CsvCommands.cs: ConvertPSObjectToCSV (#26144) 2025-10-16 10:09:49 +05:00
MartinGC94 9c5ac7d622 Add Delimiter parameter to Get-Clipboard (#26134) 2025-10-15 21:50:37 +05:00
Ryan Yates 47e38beda5 Properly Expand Aliases to their actual ResolvedCommand (#25763) 2025-10-15 21:31:04 +05:00
Jorge Suarez 26bb188c8b Improve ValidateLength error message consistency and refactor validation tests (#25806) 2025-10-13 11:55:20 +05:00
Jonathan Gilbert e562d3f39a Correct handling of explicit -Since:$false parameter value in Get-Uptime (#26141) 2025-10-09 10:48:52 +00:00
xtqqczze d581baabd4 Check for GetWindowPlacement success (#26122) 2025-10-09 15:41:08 +05:00
Jordan Borean 0ef738b36f Add property and event for debug attach (#25788)
Adds the `IsRemoteDebuggerAttached` property to `Runspace` that
indicates whether a debugger is attached to the Runspace through the
`Debug-Runspace` cmdlet. Also adds a new engine event
`PowerShell.OnDebugAttach` that is emitted when the debugger is
attached.
2025-10-07 18:34:15 -04:00
Jonathan Gilbert b5279a25a1 Correct handling of explicit -Empty:$false parameter value in New-Guid (#26140) 2025-10-06 09:48:42 +05:00
Dongbo Wang b85237876d Remove the use of Windows PowerShell ETW provider id and update PSDiagnostics module to work for PowerShell 7 (#25590) 2025-10-01 12:38:19 -07:00
PowerShell Team Bot a1fad7f738 Update package references for the master branch (#26124) 2025-09-30 13:48:45 -07:00
Dongbo Wang 716754d220 Remove ThreadJob module and update PSReadLine to 2.4.4-beta4 (#26120) 2025-09-30 12:32:43 -07:00
Andy Jordan 3aa49cca9b Remove IsScreenReaderActive() check from ConsoleHost (#26118) 2025-09-30 12:18:52 -07:00
Dongbo Wang 3cfa4b2469 Mark the 3 consistently failing tests as pending to unblock PRs (#26091) 2025-09-30 11:44:27 -07:00
Matěj KafkaandDongbo Wang 551a0fe642 Fix ConvertFrom-Json to ignore comments inside array literals (#14553) (#26050)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-09-23 10:29:11 -07:00
Dongbo Wang 506869c157 Fix -Debug to not trigger the ShouldProcess prompt (#26081) 2025-09-23 09:19:39 +05:00
PowerShell Team Bot f08e75899c Update outdated package references (#26069) 2025-09-22 16:52:58 -07:00
Travis Plunk 2376e28482 Ensure that socket timeouts are set only during the token validation (#26066)
The main goal is to ensure that socket timeouts are set only during the token validation phase and are properly reset afterward, improving reliability and preventing unintended blocking or premature timeouts in subsequent operations.
2025-09-22 10:56:19 -07:00
Travis Plunk 42e86f6c5f Fix race condition in RemoteHyperVSocket (#26057) 2025-09-15 11:37:04 -07:00
xtqqczze d418ffe84c Make some tests less noisy on failure (#26035) 2025-09-11 13:55:36 -07:00
PowerShell Team BotandDongbo Wang a1b417691f Move PowerShell build to use .NET SDK 10.0.100-rc.1 (#26027)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-09-10 14:55:07 -07:00
xtqqczze e2b2d1ea59 Ensure .cs files end with exactly one newline (#25968) 2025-09-03 14:09:34 +00:00
Dongbo Wang 53805fb426 Add the parameter Register-ArgumentCompleter -NativeFallback to support registering a cover-all completer for native commands (#25230) 2025-08-29 15:50:02 -07:00
Steve LeeandPatrick Meinecke 16aeaba68f Fix stderr output of console host to respect NO_COLOR (#24391)
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
2025-08-26 16:37:40 -04:00
PowerShell Team Bot 2fb12a31f3 Update PowerShell to use .NET SDK v10-preview.7 (#25876) 2025-08-20 14:38:09 -07:00
Dongbo Wang d68c15e743 Update PATH environment variable for package manager executable on Windows (#25847)
Implementation for PowerShell/PowerShell-RFC#391. A few implementation decisions:

1. Check the package manager list only once per process (**same as CMD**). So, changing the package manager list in registry doesn't affect a PowerShell session that is already running.

2. When detecting user/system PATH value changes, only check new items PREPENDED or APPENDED to the original string (**same as CMD**). The detection is made simple, which is not intended to detect complex changes to the user/system PATH.

3. The PATH update feature is disabled when the `Environment` provider is not available, or when the current session is restricted.
    - Both `Environment` provider and `IsSessionRestricted` are checked only once per PowerShell session.
    - Use `ConditionalWeakTable` to cache whether the feature is enabled or not for a given session.
    - We cannot use `thread-static` variable for the caching because it's possible for Runspace to reuse threads.
2025-08-20 12:53:59 -07:00
Patrick Meinecke c5f2446e69 Suppress false positive PSScriptAnalyzer warnings in tests and build scripts (#25864) 2025-08-19 11:51:38 +05:00
PowerShell Team Bot 5de50164c9 Update to .NET 10 Preview 6 (#25828) 2025-08-06 22:28:13 +00:00
Jordan Borean 4415386172 Improve the $using expression support in Invoke-Command (#24025)
Always use the v5.1 `$using:` logic when dealing with any connection type that is not based on the `WSManConnectionInfo`. This allows the caller to use the more advanced `$using` features like variables with special names, having `$using` vars inside sub scopes, and more. `WSMan` based connections might still communicate with older versions but as the oldest supported version is v3 on Server 2012. We don't need to keep the default as v2 (which has been deprecated) to support some of the newer features.
2025-08-04 16:31:30 -07:00
Aditya Patwardhan 07dfab2277 Fix updatable help test for new content (#25819) 2025-08-04 14:04:56 -07:00
Stéphane BARIZIEN a993992298 Adding hex format for native command exit codes (#21067) 2025-07-31 08:23:20 +05:00
Jordan Borean 11eeae97f0 Use parameter HelpMessage for tool tip in parameter completion (#25108)
Use the help message on the parameter in the completion tool tip to provide better completion help. This can be utilized by other tools to provide more context for a parameter outside of the current type and parameter name which is quite minimal.
2025-07-30 12:05:13 -07:00
Jordan BoreanandPatrick Meinecke ce76ae1def Fix debug tracing error with magic extents (#25726)
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
2025-07-15 13:42:09 -04:00
Jordan Borean c6329ddd54 Add MethodInvocation trace for overload tracing (#21320) 2025-07-14 15:42:14 -07:00
Justin Grote 8185a7f23e Improve verbose and debug logging level messaging in web cmdlets (#25510) 2025-06-11 09:50:26 +05:00
MartinGC94 038003408e Quote bare quote file paths if the path includes a double quote character (#25631) 2025-06-09 10:23:17 +05:00
PowerShell Team BotandDongbo Wang 82f016ffe2 Move to .NET 10 preview 4 and update package references (#25602)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-06-03 09:50:33 -07:00
CMandDongbo Wang b502098e3a Fix the common parameter -ProgressAction for advanced functions (#24591)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-06-03 09:43:38 -07:00
Tadas Medišauskas b3bc4ff4e0 Use absolute path in FileSystemProvider.CreateDirectory (#24615) 2025-05-13 11:29:48 +05:00
Matthias Wolf eb1cc6ddcd Make inherited protected internal instance members accessible in PowerShell class scope (#25245) 2025-05-12 14:30:12 -07:00
GameMicrowave fcc1833963 Treat -Target as literal in New-Item (#25186) 2025-05-12 16:22:29 +05:00
MartinGC94 e7ee9da1ea Remove duplicate modules from completion results (#25538) 2025-05-12 08:18:11 +05:00
Dongbo Wang 52150fd8a7 Add more tests for PSForEach and PSWhere methods (#25519) 2025-05-09 11:15:03 -07:00