Commit Graph
349 Commits
Author SHA1 Message Date
Chaz Beck 3eda139723 Fix Start-Process -PassThru to make sure the ExitCode property is accessible for the returned Process object (#20749) 2023-12-07 19:11:28 +00:00
Steve Lee 14245e0405 Fix rendering of DisplayRoot for network PSDrive (#20793) 2023-11-29 14:08:11 +05:00
Steve Lee 4fd4522b84 Suppress error output from Set-Location tests (#20499) 2023-10-16 19:46:59 +00:00
James Truher [MSFT] 81a7f6f621 Fix unixmode to handle setuid and sticky when file is not an executable (#20366) 2023-10-11 23:54:54 +00:00
Aditya Patwardhan ddb3b5ff4c Skip the test on x86 as InstallDate is not visible on Wow64 (#20165) 2023-08-29 12:46:53 -07:00
James Truher [MSFT] a469783e76 Harden some problematic release tests (#20155) 2023-08-28 10:55:25 -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
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
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
CarloToso cb2848c19b Code cleanup for Get-Content to make -Head and -Tail disallow negative values (#19715) 2023-06-21 09:35:18 -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
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
Steve Lee 2553a56db2 Add -Environment parameter to Start-Process (#19374)
* Add `-Environment` parameter to `Start-Process`

* address codefactor

* fix test for Windows

* handle case where value is $null to remove env var

* change variables to make it more clear what the test is doing
2023-03-27 11:05:04 -07:00
MartinGC94 48c9d68356 Add the parameter -RelativeBasePath to Resolve-Path (#19358) 2023-03-22 16:44:48 -07:00
CarloToso 9a2d2afb64 Make -Encoding parameter able to take ANSI encoding in PowerShell (#19298) 2023-03-13 15:05:28 -07:00
Travis PlunkandAditya Patwardhan b2c4888ebb Add Windows ARM64 CI (#19040)
* Add CI for win-arm64

* Add common function to test for windows arm64

* Update because string where items need investigation

---------

Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>
2023-01-31 12:06:29 -08:00
Aditya Patwardhan f8cbf90ccb Fix progress calculation divide by zero in Copy-Item (#19038) 2023-01-27 10:03:19 -08:00
Steve Lee eb9ca7c351 Fix New-Item -ItemType Hardlink to resolve target to absolute path and not allow link to itself (#18634) 2022-12-13 22:09:28 +05:00
Ilya e7c68af8bb Enable pending test for Start-Process (#18724) 2022-12-12 11:26:27 -08:00
Jordan Borean 6fa7260db9 Fix the process CommandLine on Linux (#18710) 2022-12-02 10:23:00 -08:00
Ilya 8bc9fdb2a1 Replace DllImport with LibraryImport in SMA 2 (#18543) 2022-11-22 22:22:14 +05:00
Olivia eef7c4526e Add the function cd~ (#18308) 2022-10-24 21:58:54 -07:00
Steve Lee 19ea81f6be Use shortpath instead of multiple quotes in Get-Item test relying on node (#18250) 2022-10-14 08:10:52 +05:00
Jordan Borean d66b2a5b52 Fix Parent property on processes with complex name (#17545) 2022-09-28 21:43:40 -07:00
Steve Lee 61b5dceb60 Make experimental feature PSAnsiRenderingFileInfo stable (#18042) 2022-09-12 10:23:03 -07:00
Dongbo Wang c2323db4a0 Re-enable tests because the corresponding dotnet issues were fixed (#17839) 2022-08-03 21:34:03 -07:00
Matt Graeber 6bf8a98aed Adding Virtualization-Based Security feature names to Get-ComputerInfo (#16415) 2022-07-26 10:12:36 +05:00
Steve Lee d72cedd70b Fix FileSystemProvider to work with volume and pipe paths (#15873) 2022-07-25 22:07:26 +00:00
Steve Lee 3efa28162e Change Get-ChildItem to treat trailing slash in path as indicating a directory when used with -Recurse (#17704) 2022-07-21 09:39:11 +05:00
Shuangchi He c5d31c9e10 Correct spelling in Comments and tests (#17480) 2022-06-06 09:55:33 -07:00
James Truher [MSFT] 1a24540e31 Enable more tests to be run in a container. (#17294) 2022-05-11 12:30:22 -07:00
Travis Plunk 156757c93d Add container to Linux CI (#17233) 2022-05-02 15:59:23 -07:00
Aditya Patwardhan 1268a0a04f Update .NET to 7.0.0-preview.2 build (#16930) 2022-03-18 09:10:53 -07:00
hammy3502 3eca7c019e Adds a .ResolvedTarget Property to File-System Items to Reflect a Symlink's Target as FileSystemInfo (#16490) 2022-01-21 09:23:11 +05:00
Shri Ram K S 7bb8fa16ab Fix the Max_PATH condition check to handle long path correctly (#16487) 2021-11-19 15:48:26 -08:00
Steve Lee d0e823797f Don't allow Move-Item with FileSystemProvider to move a directory into itself (#16198) 2021-10-12 14:16:32 -07:00
Dongbo Wang 2f57bf848b Change Target from a CodeProperty to be an AliasProperty that points to FileSystemInfo.LinkTarget (#16165) 2021-10-05 10:29:16 -07:00
Steve Lee 5872e47254 Fix regression in Move-Item to only fallback to CopyAndDelete in specific cases (#16029)
If Move fails, check if known case before attempting CopyAndDelete:

- if an item is attempted to be renamed across filesystem mount boundaries.
- if the source and destination do not have the same root path.
2021-09-08 11:20:30 +05:00
Aditya Patwardhan 3bb6b2736a Update Ubuntu images to use Ubuntu 20.04 (#15906) 2021-08-30 13:56:52 -07:00
Ilya 102ccffd14 Enable two previously disabled Get-Process tests (#15845) 2021-08-26 21:53:27 -07:00
Armaan Mcleod b70f06ccc6 Fix issue with Get-Process -Module failing to stop when piped to Select-Object (#15682) 2021-08-12 09:06:58 -07:00
Steve Lee cced56d75a Make PS-Committee reviewed experimental features stable (#15864) 2021-08-09 14:01:57 -07:00
Ilya 45adfee558 Enhance Remove-Item to work with OneDrive (#15571) 2021-08-05 11:41:55 -07:00
Thomas Nieto 7777afc005 Add -PassThru parameter to Set-Clipboard (#13713) 2021-07-22 10:17:53 -07:00