1276 Commits
Author SHA1 Message Date
Dongbo Wang 5d871eb5e0 Honor -Recurse when Get-ChildItem uses -Name (#28078) 2026-10-09 10:21:53 -07:00
Dongbo Wang 373f6a7b79 Fix Resolve-Path -Relative output for dot-prefixed names (#28087) 2026-10-09 10:21:34 -07:00
Dongbo Wang bd8cb01a7d Fix duplicate results from Get-Command fuzzy matching (#28042) 2026-10-09 09:35:49 -07:00
Dongbo Wang c4ae347dc9 Avoid extra SMB queries when formatting file names (#28038) 2026-10-09 09:35:18 -07:00
Travis Plunk 88937ea0a7 Fix flaky Debug-Runspace attach event test (#27885) 2026-09-16 14:50:13 -07:00
Anam Navied 9f7b30680d Improve CAB extraction path handling (#28009) 2026-09-11 15:23:35 -07:00
Anam Navied 85efec2e1e Improve validation for Copy-Item -FromSession (#28006) 2026-09-11 13:41:30 -07:00
powershell-pr-automation[bot] d54afc0d5e Move to the .NET SDK 11-rc.1 for preview release (#27992) 2026-09-09 11:25:42 -07:00
Anam NaviedandPatrick Meinecke 91448ff154 Improve Authorization Header default and redirect behavior (#27873)
Co-authored-by: Patrick Meinecke <pmeinecke@microsoft.com>
2026-08-20 16:57:20 -04:00
Dongbo Wang 9337fa1411 Fix the scripts used for Copy-Item -FromSessoin/-ToSession scenarios and also enable tests (#27773)
- Fix the scripts used for `Copy-Item -FromSessoin/-ToSession` and `PSEdit`. They use `-Encoding Byte`, which only works in PS5.1. In PS 7+, we need to use `-AsByteStream` instead. So, those scenarios (copy alternate data stream to/from remote PS 7 session and edit file from a remote PS 7 session) have been broken for a long time.
- The remote tests for `Copy-Item` have always been disabled. This PR re-enables those tests for Windows (the `HelperRemoting` module only works on Windows).
2026-08-18 16:01:04 -07:00
Dongbo Wang bac40c877b Fix PATH caching in CommandDiscovery code (#27809)
The method `GetLookupDirectoryPaths` always returns the cached instance of path collection. However, the returned collection gets mutated in `CommandPathSearch.ResolveCurrentDirectoryInLookupPaths` to resolve the relative paths such as `.\tools` based on the user's current working directory `$PWD`, so for example, `.\tools` gets replaced with `cwd-1\tools` in the cached instance. Then, when the user changes to a different working directory `cwd-2`, command discovery won't find the executable or ps1 script under `cwd-2/tools` as expected, but those executables under `cwd-1\tools` will always be discoverable no matter what the `$PWD` is. That behavior is incorrect.

This pull request improves the caching logic of `GetLookupDirectoryPaths` and makes it return a copy of the path collection, so the mutation happens to the returned copy, and the cached instance is kept intact. So, for every command search, the `CommandPathSearch` will resolve relative paths against the `$PWD` that the user is located at that time.
2026-08-17 15:31:31 -07:00
Kirtikumar Anandrao RamchandaniandJustin Chung f83ccddf80 Add New-TemporaryDirectory cmdlet (#27549)
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>
2026-08-17 13:35:04 -05:00
Kirtikumar Anandrao RamchandaniandJustin Chung 91ce9844e2 Fix TimeZone test with duplicate names (#27525)
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>
2026-08-10 14:07:19 -05:00
Patrick Meinecke 2ca393d6b8 Add support for new WLDP setting EnableFileOnlyEntry (#26752) 2026-08-10 13:29:03 -04:00
6f7ffc2a17 Change New-Guid to generate UUID v7 by default (#27033)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>
2026-06-26 11:25:35 -05:00
Patrick MeineckeandDongbo Wang e2784b8867 Update MaxVisitCount and MaxHashtableKeyCount if VisitorSafeValueContext indicates SkipLimitCheck is true (#27306)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2026-04-20 10:56:25 -07:00
Dongbo Wang c19a440244 Fix Import-Module.Tests.ps1 to handle Arm32 platform (#26862) 2026-02-20 14:05:55 -08:00
Yoshifumi 2f08eb44e6 Add comprehensive PowerShell class tests for ConvertTo-Json (#26769) 2026-02-19 11:04:48 -08:00
Yoshifumi 9d68a05ac3 Add comprehensive PSCustomObject tests for ConvertTo-Json (#26743) 2026-02-18 11:04:45 -08:00
Yoshifumi 664ac75f4f Add comprehensive depth and multilevel composition tests for ConvertTo-Json (#26744) 2026-02-09 16:43:02 -08:00
Yoshifumi 4382544127 Add comprehensive array and dictionary tests for ConvertTo-Json (#26742) 2026-02-06 09:41:03 -08:00
Yoshifumi dd4f2fecfa Add comprehensive scalar type tests for ConvertTo-Json (#26736) 2026-02-05 15:51:22 -08:00
Yoshifumi 8489f8fc34 Mark -NoTypeInformation as obsolete no-op and evaluate -IncludeTypeInformation on by value on Csv cmdlets (#26719) 2026-01-28 17:06:15 -05:00
Yoshifumi d0d39c03b1 Fix Test-Json false positive errors when using oneOf or anyOf in schema (#26618) 2025-12-17 09:15:36 +00:00
Copilot 2e7765eef1 Fix $PSDefaultParameterValues leak causing tests to skip unexpectedly (#26602)
This fixes test isolation issues where six test files were leaking $PSDefaultParameterValues["It:Skip"] settings to subsequent tests, causing widespread test skipping on Linux. The fixes address two distinct patterns: using .Remove() which doesn't restore the original state (4 files), and imbalanced Push-DefaultParameterValueStack/Pop-DefaultParameterValueStack calls (2 files).
2025-12-12 09:26:46 +05:00
Yoshifumi 6311c7c2f6 Add -ExcludeProperty parameter to Format-* cmdlets (#26514) 2025-12-05 04:54:52 +00:00
Yoshifumi 70a6a80f6b Add -Extension parameter to Join-Path cmdlet (#26482) 2025-11-22 18:28:27 +05:00
Yoshifumi 8948c417c0 Make Export-Csv -Append and -NoHeader mutually exclusive (#26472) 2025-11-22 12:38:35 +05:00
yotsuda bb712def99 Respect -Qualifier/-NoQualifier/-Leaf/-IsAbsolute:$false in Split-Path (#26474) 2025-11-21 22:56:07 +05:00
yotsuda fb6403d4da Respect -Repeat/-MtuSize/-Traceroute:$false in Test-Connection (#26479) 2025-11-21 17:12:28 +05:00
yotsuda 108eb857bb Correct handling of explicit -[Operator]:$false parameter values in Where-Object (#26485) 2025-11-21 17:06:23 +05:00
yotsuda d486365b24 Fix Invoke-RestMethod to support read-only files in multipart form data (#26454) 2025-11-18 17:49:38 +05:00
yotsuda 11d154c673 Respect -ListAvailable:$false in Get-TimeZone (#26463) 2025-11-17 22:04:57 +05:00
yotsuda e741cecab3 Respect -Shuffle:$false in Get-SecureRandom (#26460) 2025-11-17 11:45:14 +05:00
yotsuda 77f1d99568 Respect -Shuffle:$false in Get-Random (#26457) 2025-11-17 08:36:48 +05:00
Dongbo Wang 943257b247 Make some experimental features stable (#26348)
The following experimental features are made stable:
- PSNativeWindowsTildeExpansion
- PSRedirectToVariable
- PSSubsystemPluginModel
2025-10-30 14:26:03 -07:00
xtqqczze 82d59136b2 Use [initialsessionstate] type accelerator (#25912) 2025-10-24 04:54:03 +00: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
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
Jonathan Gilbert e562d3f39a Correct handling of explicit -Since:$false parameter value in Get-Uptime (#26141) 2025-10-09 10:48:52 +00: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
Dongbo Wang 716754d220 Remove ThreadJob module and update PSReadLine to 2.4.4-beta4 (#26120) 2025-09-30 12:32:43 -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
xtqqczze d418ffe84c Make some tests less noisy on failure (#26035) 2025-09-11 13:55:36 -07:00
Patrick Meinecke c5f2446e69 Suppress false positive PSScriptAnalyzer warnings in tests and build scripts (#25864) 2025-08-19 11:51:38 +05:00