Commit Graph
1183 Commits
Author SHA1 Message Date
PowerShell Team Bot 010da3a003 [release/v7.4] Suppress false positive PSScriptAnalyzer warnings in tests and build scripts (#26058) 2025-10-09 15:54:03 -07:00
Dongbo WangandCarloToso 35994915e6 Fix WebCmdlets when -Body is specified but ContentType is not (#23952) (#24145)
Co-authored-by: CarloToso <105941898+CarloToso@users.noreply.github.com>
2024-08-13 16:06:06 -07:00
Aditya Patwardhan 45d9990c1d Merged PR 31780: Resolve paths correctly when importing files or files referenced in the module manifest 2024-07-16 16:00:38 +00:00
Aditya PatwardhanandSteve Lee dc60e20cfb Fix Test-Path -IsValid to check for invalid path and filename characters (#21358) (#23931)
Co-authored-by: Steve Lee <slee@microsoft.com>
2024-06-11 16:05:59 -07:00
Patrick MeineckeandSteve Lee b0692c1f07 [release/v7.4.2] Revert "Adjust PUT method behavior to POST one for default content type in WebCmdlets" (#21049) (#21428)
Co-authored-by: Steve Lee <slee@microsoft.com>
2024-04-05 10:55:17 -07:00
Patrick Meinecke c16cfe8f87 [release/v7.4.2] Fix regression -Tail 0 -Wait (#20734) (#21418) 2024-04-04 15:24:35 -07:00
Patrick Meinecke feafe7aa67 [release/v7.4.2] Fix a regression in Format-Table when header label is empty (#21156) (#21420) 2024-04-04 15:22:02 -07:00
Patrick Meinecke cedb0589b6 [release/v7.4.2] Fix Get-Error serialization of array values (#21085) (#21419) 2024-04-04 15:21:42 -07:00
Dongbo Wang 6a98b28414 Merged PR 29197: Backport three PRs to v7.4.1 release
The PRs are listed here: https://github.com/PowerShell/PowerShell/pulls?q=is%3Apr+label%3ABackPort-7.4.x-Consider+is%3Aclosed
2024-01-11 03:29:18 +00:00
Dongbo Wang 851d21b673 Fix Start-Process -PassThru to make sure the ExitCode property is accessible for the returned Process object (#20749) (#20866) 2023-12-07 21:39:08 -08:00
Dongbo Wang 29fa9dfabd Fix rendering of DisplayRoot for network PSDrive (#20793) (#20863) 2023-12-07 21:36:40 -08:00
Travis Plunk 883fc73045 Merged PR 28427: [backport] Update PSResourceGet version for 1.0.1 release (#20652)
Update `PSResourceGet` version for `1.0.1` release (#20652)
2023-11-10 18:14:15 +00:00
Aditya Patwardhan 594abae9a1 Merged PR 28409: Remove Auth header content from ErrorRecord
Remove Auth header content from ErrorRecord
2023-11-09 03:08:28 +00:00
Aditya Patwardhan bd8030de27 Added a missing ConfigureAwait(false) call (#20606) (#20622) 2023-11-01 13:38:24 -07:00
Aditya Patwardhan b60d5659e7 Bump PSReadLine from 2.2.6 to 2.3.4 (#20305) (#20533) 2023-10-19 18:56:29 -07:00
Aditya Patwardhan 5c1ca0f3f6 Fix unixmode to handle setuid and sticky when file is not an executable (#20366) (#20537) 2023-10-19 14:43:22 -07:00
Aditya Patwardhan dd1fe759d4 Fix implicit remoting proxy cmdlets to act on common parameters (#20367) (#20530) 2023-10-19 14:35:40 -07:00
Dongbo Wang d5e2ddb984 [release/v7.4.0-preview.6] Continued improvement to tests for release automation (#20182) (#20259) 2023-09-11 17:22:25 -07:00
Dongbo Wang 67310dfc2a [release/v7.4.0-preview.6] Skip the test on x86 as InstallDate is not visible on Wow64 (#20165) (#20255) 2023-09-11 16:50:09 -07:00
Dongbo Wang 08b6f61798 [release/v7.4.0-preview.6] Harden some problematic release tests (#20155) (#20254) 2023-09-11 16:45:46 -07:00
James Truher [MSFT] 046301b716 Additional test hardening for tests which fail in release pass. (#20093) 2023-08-16 11:28:59 -07:00
James Truher [MSFT] 91447e62de Fixes for release tests (#20028) 2023-07-27 15:04:30 -07:00
CarloToso e8ce6a5b1f Support Unix-Socket in WebCmdlets (#19343) 2023-07-24 16:44:32 -07:00
MartinGC94 3f128d680f Change how relative paths in Resolve-Path are handled when using the RelativeBasePath parameter (#19755) 2023-07-24 09:47:24 -07:00
dwtaber 3b9e70cfc8 Wait-Process: add -Any and -PassThru parameters (#19423) 2023-07-24 09:46:16 -07:00
Armaan Mcleod 836c0c580b Added -CaseInsensitive switch parameter to Select-Object & Get-Unique cmdlets (#19683)
* Added Select-Object CaseInsensitive parameter and tests

* Added Get-Unique CaseInsensitive parameter and tests

* Fix codefactor issue

* Add named arguements

* Remove comments
2023-07-24 09:34:42 -07:00
Sean Wheeler 5595072568 Change docs.microsoft.com to learn.microsoft.com (#19994) 2023-07-17 15:54:17 -07:00
Steve Lee 5a6c66be13 Restore-Computer and Stop-Computer should fail with error when not running via sudo on Unix (#19824) 2023-07-17 14:20:06 -07:00
Armaan Mcleod d24285f437 Remove input text from the error message resulted by SecureString and PSCredential conversion failure (#19977) 2023-07-17 10:30:10 -07:00
James Truher [MSFT] ee13bb9f05 Add more debugging to try to determine why these test fail in release build. (#19829) 2023-07-05 07:40:30 -07:00
CarloToso cb2848c19b Code cleanup for Get-Content to make -Head and -Tail disallow negative values (#19715) 2023-06-21 09:35:18 -07:00
MartinGC94 15213d8494 Do not require activity when creating a completed progress record (#18474) 2023-06-19 16:20:08 -07:00
stevenebutler d614858550 WebCmdlets: Rename -TimeoutSec to -ConnectionTimeoutSeconds (with alias) and add -OperationTimeoutSeconds (#19558) 2023-06-19 15:07:16 -07:00
James Truher [MSFT] 133acc1961 Fix logic for Import-CliXml test (#19805) 2023-06-19 10:26:38 -07:00
alerickson c43beccaa2 Add reference to PSResourceGet (#19597) 2023-06-16 16:16:34 -07:00
James Truher [MSFT] ba0de3b4fe Add some debugging to the transcript test for SilentlyContinue (#19770) 2023-06-12 17:03:53 -07:00
CarloToso 1822ad7373 Add FileNameStar to MultipartFileContent in WebCmdlets (#19467) 2023-06-12 09:55:32 -07:00
James Truher [MSFT] 22fdbbda0b Re-enable Get-ComputerInfo pending tests (#19746) 2023-06-05 16:36:59 -07:00
MartinGC94 2e2b7db092 Fix wildcard globing in root of device paths (#19442) 2023-05-15 10:15:05 -07:00
Steve Lee 7888196b87 Add specific error message that creating Junctions requires absolute path (#19409) 2023-05-09 08:37:28 -07:00
xtqqczze d314b0b1c0 Fix incorrect test cases in ExecutionPolicy.Tests.ps1 (#19485) 2023-05-09 00:12:07 +00:00
mkht 9502931493 Fix HTTP status from 409 to 429 for WebCmdlets to get retry interval from Retry-After header. (#19622) 2023-05-08 15:57:27 -07:00
Greg Dennis 1b248efb3f Test-Json: Use JsonSchema.Net (System.Text.Json) instead of NJsonSchema (Newtonsoft.Json) (#18141)
Updates the Test-Json cmdlet to use JsonSchema.Net instead of NJsonSchema in order to:

- use System.Text.Json instead of Newtonsoft
- support the latest JSON Schema drafts (up to 2020-12)
2023-05-04 08:19:32 +05:00
07e041fe10 Allow combining of -Skip and -SkipLast parameters in Select-Object cmdlet. (#18849)
* Added SkipLast parameter set to Skip parameter and updated tests

* Using Should -BeExactly with string

* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1

---------

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Travis Plunk <github@ez13.net>
2023-05-02 13:07:32 -07:00
Steve LeeandJames Truher [MSFT] a153446a01 Add Get-SecureRandom cmdlet (#19587)
* Add `Get-SecureRandom` cmdlet

* update comments

* address Paul and Travis' comments

* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Get-SecureRandom.Tests.ps1

Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>

* address codefactor

* address Ilya's feedback creating a base class for both cmdlets

* remove unused `using`

---------

Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
2023-05-02 10:54:39 -07:00
Olivia 05fbceb48c Fix New-Item to re-create Junction when -Force is specified (#18311) 2023-05-02 09:36:33 -07:00
Jack CaseyandTravis Plunk 698742ea9f Test-Connection: Increase output detail when performing a tcp test (#11452)
* Added verbose TCP test logic

* Cleaned up output, removed source IP address

* Consolidated detailed output logic into ProcessConnectionByTCPPort()

* Updated existing tests with -Quiet switch

* Improved output formatting, changed logic to match

* Error handling and logic improvements

* Updated tests to match new output

* Updated logic, tcp tests now run once by default

* Moved TcpConnectionTestResult enum into TcpTestStatus class

* Removed unnecessary whitespace

* Wrapped TcpClient() in Using statement

* Appended missing period on comments

* Change TcpTestStatus to TcpPortStatus for better clarity

* Set default count back to 4

* Move stopwatch reset into finally block

* Change TcpConnectionTestResult.New to TcpConnectionTestResult.None

* Formatting fixes

* Increase column size for Result output

* Update logic for -quiet option

* Change "TestNum" property to "Id"

* Change Destination and DestinationAddress to Target and TargetAddress in TcpPortStatus

* Implement new form of using declaration

* Fix indentation

* Update output, improve logic and update tests

* Add CancellationToken to allow cancel before timeout

* Assign testResult.Connected to client.Connected

* Move TcpPortStatus object creation to after connection test

* Remove delay from final connection test in loop

* Move Count logic from ProcessConnectionByTCPPort into own function

* Fix small formatting error

* Add handling for TaskCanceledException

* Remove redundant CancellationToken getter

* Clean up handling of SocketException

* Increase readability of final loop check

* Remove unnecessary TimeSpan invocation

* Rename cancellationTokenSource to match convention

* Move SetCountForTcpTest() into BeginProcessing()

* Added nameof to Count check

* Removed explicit type declaration for TcpClient

* Move delay and timeout evaluation out of the cycle

* Remove redundant CancellationTokenSource

* Initialize detailed SwitchParameter

* Add check for Detailed parameter

* Remove redundant tests for non-detailed output

* Add return after first boolean output

* Update tests with new detailed parameter set

---------

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2023-05-01 14:16:11 -07:00
Aditya Patwardhan cf6fc53c9f Fix test failures on Windows for time zone and remoting (#19466) 2023-04-25 11:06:34 -07:00
stevenebutler 319c9faf57 Improve reliability of the Ctrl+c tests for WebCmdlets (#19532) 2023-04-20 09:40:01 -07:00
Dongbo Wang 8ed8b52700 Fix a race condition in Add-Type (#19471) 2023-04-12 21:41:43 -07:00