Commit Graph
2314 Commits
Author SHA1 Message Date
Olivia 05fbceb48c Fix New-Item to re-create Junction when -Force is specified (#18311) 2023-05-02 09:36:33 -07:00
xtqqczze c77c286d7a Remove PSv2CompletionCompleter as part of the PowerShell v2 code cleanup (#18337) 2023-05-01 22:00:07 -07:00
MartinGC94 5605b24b08 Improve Hashtable key completion for type constrained variable assignments, nested Hashtables and more (#17660) 2023-05-01 16:26:41 -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
xtqqczze 31bc65ef65 Refactor MUIFileSearcher.AddFiles in the help related code (#18825) 2023-05-01 11:43:04 -07:00
Aditya Patwardhan 72c81b820a Set SetLastError to true for symbolic and hard link native APIs (#19566) 2023-05-01 10:56:16 -07:00
Patrick Meinecke 2424ad83aa Support byte stream piping between native commands and file redirection (#17857) 2023-04-27 17:17:32 -07:00
Jordan Borean 93e9c63331 Fix Get-AuthenticodeSignature -Content to not roundtrip the bytes to a Unicode string and then back to bytes (#18774) 2023-04-25 12:11:04 -07:00
Steve Lee 5e96ed3822 Change the arrow used in feedback suggestion to a more common Unicode character (#19534) 2023-04-18 17:15:51 -07:00
Dongbo Wang 457606af94 Support trigger registration in feedback provider (#19525) 2023-04-18 17:15:09 -07:00
PowerShell Team Bot e1b392b6ff Update .NET SDK version from 8.0.100-preview.2.23157.25 to 8.0.100-preview.3.23178.7 (#19381) 2023-04-18 15:24:51 -07:00
Ikko Eltociear Ashimine af2f2f454e Fix typo in Compiler.cs (#19491)
inital -> initial
2023-04-12 09:51:22 +05:00
Darren Kattan 9d036c4876 Revert "Bump Microsoft.CodeAnalysis.CSharp from 4.5.0 to 4.6.0-2.23152.6" (#19464) 2023-04-11 00:24:42 +00:00
Steve Lee 7c0fe762a9 Remove code related to #requires -pssnapin (#19320) 2023-04-03 14:56:40 -07:00
Steve Lee 04b93af4ae Enable type conversion of AutomationNull to $null for assignment (#19415) 2023-04-03 09:36:36 -07:00
Dongbo Wang 51f55f716e Update the ICommandPredictor interface to reduce boilerplate code from predictor implementation (#19414) 2023-03-29 11:27:04 -07:00
MartinGC94 25651ef6e9 Fix a crash in the type inference code (#19400) 2023-03-23 14:40:50 -07:00
MartinGC94 18f0c5ad4b Exclude redundant parameter aliases from completion results (#19382) 2023-03-22 08:58:15 +05:00
CarloToso 69e9b439fd Fix codefactor if part 5 (#19286) 2023-03-16 22:02:42 +05:00
MartinGC94 39d48f9c62 Infer external application output as strings (#19193) 2023-03-14 11:24:43 -07:00
Ikko Eltociear Ashimine 9d1756efa7 Fix typo in typeDataXmlLoader.cs (#19319) 2023-03-14 08:56:14 +05:00
MartinGC94 e6655d1f17 Fix completion for PSCustomObject variable properties (#18682) 2023-03-13 17:38:21 -07:00
dependabot[bot] 6e408649c4 Bump Microsoft.CodeAnalysis.CSharp from 4.5.0 to 4.6.0-2.23152.6 (#19306) 2023-03-13 17:34:39 -07:00
MartinGC94 0ae521b7b5 Improve type inference for Get-Random (#18972) 2023-03-13 15:44:38 -07:00
CarloToso 9a2d2afb64 Make -Encoding parameter able to take ANSI encoding in PowerShell (#19298) 2023-03-13 15:05:28 -07:00
dependabot[bot] cf93f01ea1 Bump Newtonsoft.Json from 13.0.2 to 13.0.3 (#19290) 2023-03-13 14:40:28 -07:00
Ilya 9dd932256f Remove unused GUID detection code from console host (#18871) 2023-03-13 14:19:03 -07:00
Aditya Patwardhan b58db8b8f7 Bump .NET to Preview 2 version (#19305) 2023-03-09 15:06:36 -08:00
James Truher [MSFT] 14d7bfee1d Telemetry improvements for tracking experimental feature optout (#18762) 2023-03-08 09:29:11 -08:00
Steve Lee 66a89826bb Fix PlainText output to correctly remove Reset VT sequence w/o number (#19283) 2023-03-07 14:18:16 -08:00
CarloToso ff32e01d31 Fix CodeFactor issues in the code base - part 4 (#19270) 2023-03-07 12:18:43 -08:00
Mathias R. Jessen 1925cf67af Add Statement property to $MyInvocation (#19027) 2023-03-06 15:01:42 -08:00
Jordan Borean efc7385c50 Fix Start-Process -Wait with -Credential (#19096)
Allows a non-administrator user to be able to -Wait on a Start-Process
call with a custom credential specified.
2023-03-06 10:31:16 -08:00
CarloToso 4e3f4ca62d Fix codefactor if part 3 (#19269) 2023-03-06 09:59:56 +05:00
CarloToso 0d6b93a23f Fix codefactor if part 2 (#19267) 2023-03-04 22:30:14 +05:00
CarloToso d00407612c Fix codefactor if part 1 (#19266) 2023-03-03 23:51:53 +05:00
Dongbo Wang 3cdd1fa6ef Revert "Use ArgumentNullException.ThrowIfNull part 2 (#19258)" (#19263)
This reverts commit 8d8f45e3df.
2023-03-02 12:00:23 -08:00
CarloToso 8d8f45e3df Use ArgumentNullException.ThrowIfNull part 2 (#19258) 2023-03-02 22:29:46 +05:00
Steve Lee ec258e210f Fix ConciseView to handle custom ParserError error records (#19239) 2023-03-01 11:18:11 -08:00
Berkan Diler f1b6495562 Use C# 11 UTF-8 string literals (#19243) 2023-03-01 09:41:56 +05:00
Steve Lee 9764e3c22a Fix VtSubstring helper method to correctly check chars copied (#19240) 2023-02-28 17:24:31 -08:00
CarloToso c48e5cbcca Use ArgumentException.ThrowIfNullOrEmpty() in more places (#19213) 2023-02-27 14:42:07 -08:00
dependabot[bot] 4284a318c0 Bump Microsoft.CodeAnalysis.CSharp from 4.4.0 to 4.5.0 (#19233) 2023-02-27 14:10:52 -08:00
Berkan Diler 0ba89599b2 Replace BitConverter.ToString with Convert.ToHexString where appropriate (#19216) 2023-02-27 14:03:54 -08:00
xtqqczze 744127608e Replace Requires.NotNullOrEmpty(string) with ArgumentException.ThrowIfNullOrEmpty (#19197) 2023-02-24 09:45:33 -08:00
xtqqczze 4314e634ca Use ArgumentOutOfRangeException.ThrowIfNegativeOrZero when applicable (#19201) 2023-02-23 14:15:24 -08:00
MartinGC94 0a11f799dc Add property assignment completion for enums (#19178)
* Add property assignment completion for enums

* Move method
2023-02-23 13:42:57 -08:00
xtqqczze 6055a82f6b Use CallerArgumentExpression on Requires.NotNull (#19200) 2023-02-23 10:21:38 -08:00
Aditya Patwardhan 2d15e0c5b6 Update to .NET 8 preview 1 build (#19194) 2023-02-22 16:12:16 -08:00
Dongbo Wang 79b4b5c33f Update the FeedbackProvider interface to return structured data (#19133) 2023-02-22 16:01:18 -08:00