Commit Graph
100 Commits
Author SHA1 Message Date
Ilya 7d6b6d8bf3 Add internal methods to check Preferences (#25514) 2025-05-08 00:10:05 +05:00
Ilya 5153f9ba63 Replace PSVersion source generator with incremental one (#23815) 2024-08-19 21:45:45 -07:00
Ilya 9dd932256f Remove unused GUID detection code from console host (#18871) 2023-03-13 14:19:03 -07:00
Ilya 046c8d4917 Fix regression in RemoveNulls (#18881) 2023-01-10 07:38:16 +05:00
Ilya 218c6cea15 Unify CreateFile pinvoke in SMA (#18751) 2022-12-15 11:05:07 +05:00
Ilya e7c68af8bb Enable pending test for Start-Process (#18724) 2022-12-12 11:26:27 -08:00
Ilya 67a78d3004 Remove one CreateFileW (#18732) 2022-12-06 23:36:47 +05:00
Ilya 07175ae0ff Replace DllImport with LibraryImport for WNetAddConnection2 (#18721) 2022-12-05 23:50:22 +05:00
Ilya 5d9835f46e Use File.OpenHandle() instead CreateFileW pinvoke (#18722) 2022-12-05 22:38:45 +05:00
Ilya bdea773598 Replace DllImport with LibraryImport for WNetGetConnection (#18690) 2022-12-03 17:16:26 +05:00
Ilya 3dc95ced87 Replace DllImport with LibraryImport - 1 (#18603) 2022-11-30 10:00:12 -08:00
Ilya 8686612cfe Replace DllImport with LibraryImport in SMA 3 (#18564) 2022-11-29 08:08:02 +05:00
Ilya 019c3b87df Replace DllImport with LibraryImport in SMA - 7 (#18594) 2022-11-28 11:18:04 -08:00
Ilya 20f0b6e3bd Replace DllImport with LibraryImport in SMA 8 (#18599) 2022-11-23 09:13:05 +05:00
Ilya 5b4a34fcc9 Replace DllImport with LibraryImport in SMA 4 (#18579) 2022-11-23 09:11:52 +05:00
Ilya ea428a6e1f Remove NativeCultureResolver as dead code (#18582) 2022-11-23 09:10:32 +05:00
Ilya 05e50dfbd7 Replace DllImport with LibraryImport in SMA 6 (#18581) 2022-11-22 23:27:45 +05:00
Ilya 8bc9fdb2a1 Replace DllImport with LibraryImport in SMA 2 (#18543) 2022-11-22 22:22:14 +05:00
Ilya 0d320ab89a Use standard SBCS detection (#18593) 2022-11-22 09:13:09 -08:00
Ilya 041f4332e5 Remove unused pinvokes in RemoteSessionNamedPipe (#18583) 2022-11-22 09:12:41 -08:00
Ilya 0d4def9037 Replace DllImport with LibraryImport in SMA 5 (#18580)
Remove unused code.
2022-11-22 10:21:25 +05:00
Ilya 65176b4df1 Remove SafeRegistryHandle (#18597) 2022-11-22 08:33:51 +05:00
Ilya 6aa74c5c3c Remove ArchitectureSensitiveAttribute from the code base (#18598) 2022-11-18 14:15:05 -08:00
Ilya b84652745c Replace DllImport with LibraryImport in SMA 1 (#18520) 2022-11-12 16:48:27 +05:00
Ilya 8965af3d52 Remove some static constants from Utils.Separators (#18154) 2022-10-27 15:25:41 -07:00
Ilya ece26bcf11 Remove FusionAssemblyIdentity and GlobalAssemblyCache as they are not used (#18334) 2022-10-24 12:16:22 -07:00
Ilya dd3a6a10d4 Use source generator for PSVersionInfo to improve startup time (#15603) 2022-10-11 11:50:16 -07:00
Ilya 3a506b9692 Fix decompression in web cmdlets (#17955) 2022-10-04 09:33:37 -07:00
Ilya 8973b0c121 Use overload APIs that take char instead of string when it's possible (#18179) 2022-09-29 09:39:04 -07:00
Ilya 08e4596463 Move the type data definition of System.Security.AccessControl.ObjectSecurity to the Microsoft.PowerShell.Security module (#16355) 2022-07-25 21:16:52 -07:00
Ilya 57dbecb612 Add Amended switch to Get-CimClass cmdlet (#17477)
* Add Amended switch to Get-CimClass cmdlet

* Fix CodeFactor issues
2022-06-08 16:25:13 -07:00
Ilya a5d41c2287 Use FindFirstFileW instead of FindFirstFileExW to correctly handle Unicode file names on FAT32 (#16840) 2022-02-05 07:13:14 -08:00
Ilya 9f722ef950 Use more efficient platform detection API (#16760)
* Use more efficient platform detection API

Use static and const new OperatingSystem class API to avoid string comparisons and extra allocations.

* Remove unused variable
2022-01-27 08:53:52 -08:00
Ilya ef69fdafc4 Remove unneeded call to File.ResolveLinkTarget from IsWindowsApplication (#16371) 2021-11-03 22:28:04 -07:00
Ilya 51e11aaedf Remove unnecessary call to ToArray (#16307) 2021-10-28 11:22:09 -07:00
Ilya 48be7b7f45 Avoid validation for built-in file extension and color VT sequences (#16320) 2021-10-28 11:17:15 -07:00
Ilya d36dc85612 Enable two previously disabled Get-Process tests (#15845) 2021-09-15 11:09:04 -07:00
Ilya 102ccffd14 Enable two previously disabled Get-Process tests (#15845) 2021-08-26 21:53:27 -07:00
Ilya 45adfee558 Enhance Remove-Item to work with OneDrive (#15571) 2021-08-05 11:41:55 -07:00
Ilya aaaa0f2baa Thread-safe HttpKnownHeaderNames initialization (#15519) 2021-08-04 15:00:26 -07:00
Ilya f18a542bf6 Remove consolehost.proto file (#15741) 2021-07-20 14:53:33 -07:00
Ilya 0f3bc73d9a Implement a completion for View parameter of format cmdlets (#14513) 2021-07-13 17:32:48 +00:00
Ilya d5aa9015bd Temporarily disable Update-Help tests for PackageManagement module (#15661) 2021-06-24 11:35:35 -07:00
Ilya f570029986 Enable nullable: System.Management.Automation.ICommandRuntime (#15566) 2021-06-14 10:57:34 -07:00
Ilya 08e731398c Enhance Remove-Item to work with OneDrive (Second) (#15260) 2021-04-27 12:31:12 -07:00
Ilya 91e7298fd8 Use static lambda keyword (#15154) 2021-04-12 12:44:05 -07:00
Ilya fafc38fe5c Enhance Remove-Item to work with OneDrive (#14902) 2021-04-12 09:36:16 -07:00
Ilya 65456893bd Avoid string.ToLowerInvariant() from GetEnvironmentVariableAsBool() to avoid loading ICU at startup (#14323) 2021-01-06 10:24:40 -08:00
Ilya 10ef7f5161 Fix PSStyle blink codes (#14447) 2020-12-19 11:51:29 +05:00
Ilya ba49eb225f Optimize IEnumerable variant of replace operator (#14221) 2020-12-09 11:46:27 -08:00
Ilya ea3036dc6d Use Environment.TickCount64 instead of Datetime.Now as the random seed for AppLocker test file content (#14283) 2020-12-04 09:24:42 -08:00
Ilya 927d20aec2 Fix a broken link in Code Guidelines doc (#14314) 2020-12-03 22:42:35 -08:00
Ilya 03f40a0078 Use OrdinalIgnoreCase in CommandLineParser (#14303) 2020-12-03 14:34:00 -08:00
Ilya 2804576840 Avoid an exception if file system does not support reparse points (#13634) 2020-12-03 11:24:49 -08:00
Ilya 548e939894 Use StringComparison.Ordinal insted of StringComparison.CurrentCulture (#14298) 2020-12-02 13:35:29 -08:00
Ilya d9090b4a49 Write better error message if config file is broken (#13496) 2020-11-13 17:22:26 -08:00
Ilya 53e8199856 Fix a logic bug in MapSecurityZone (#13921) 2020-11-02 19:39:31 -08:00
Ilya dfc591c218 Fix NRE in Test-Json (#12942) 2020-10-27 13:54:52 -07:00
Ilya 81d5a86747 Add support for Tls 1.3 in Web cmdlets (#13409) 2020-09-02 10:18:15 -07:00
Ilya 3b83a686a1 Add null check for args in CommandLineParser (#13451) 2020-08-28 12:03:30 -07:00
Ilya 4e2b6e9540 Process reparse points for Microsoft Store applications (#13481) 2020-08-27 11:51:19 -07:00
Ilya 68d46c1792 Refactor command line parser to do early parsing (#11482) 2020-08-12 09:58:46 -07:00
Ilya 58b91a89b6 Fix conflicting shorthand switch -s (sta) for pwsh (#13262) 2020-07-31 09:40:42 -07:00
Ilya 6dec823077 Fix Test-XUnitTestResults function (#13270) 2020-07-29 22:17:46 +05:00
Ilya e88e8bd297 Set C# language version to preview/9.0 (#13090) 2020-07-21 12:34:08 -07:00
Ilya 8c22e5f7d0 Change exe '-inputformat' switch prefix '-in' to '-inp' to fix conflict with '-interactive' (#13205) 2020-07-20 12:16:00 -07:00
Ilya 0f6fe9b046 Disable R2R for debug build (#13144) 2020-07-10 08:55:49 -07:00
Ilya 5ad8a5916f Add support for some .NET intrinsic type converters (#12580) 2020-07-08 14:32:58 -07:00
Ilya 0c8aa53a90 Add new test for Format-Custom to avoid data loss (#11393) 2020-06-30 09:39:48 +05:00
Ilya 409bd318f1 Rename the CimCmdlet resource file (#12955) 2020-06-15 11:00:02 -07:00
Ilya 80ac3cc735 Enable skipped tests (#12894) 2020-06-05 12:01:53 -07:00
Ilya 73e8427586 Bring back Certificate provider parameters (#10622) 2020-06-02 11:44:16 -07:00
Ilya 3de9069ca7 Fix New-Item to create symbolic link to relative path target (#12797) 2020-06-01 13:12:27 -07:00
Ilya c7455fd4d8 Add CommandLine property to Process (#12288) 2020-05-29 11:33:49 -07:00
Ilya c602f8272e Remove extra line before formatting group (#12163) 2020-05-28 13:19:56 -07:00
Ilya 16c1a369b3 Make -OutFile param in web cmdlets to work like -LiteralPath (#11701) 2020-05-20 15:17:02 -07:00
Ilya 1c4ecb6ec5 Update the owner list for ConsoleHost (#12508) 2020-04-28 11:07:54 -07:00
Ilya 7c1cc868b2 Use new TargetFramwork as net5.0 in packaging scripts (#12503) 2020-04-27 16:28:17 -07:00
Ilya 86b6a9d5ca Set correct PSProvider full name (#11813) 2020-04-27 16:24:42 -07:00
Ilya 1a7692fd1a Use new value for TargetFramework as net5.0 instead of netcoreapp5.0 (#12486) 2020-04-27 08:40:09 -07:00
IlyaandTravis Plunk 5cd89a407d Turn on ReadyToRun (#12361)
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2020-04-22 12:13:48 -07:00
Ilya 264bcb3fda Update UseNewEnvironment parameter behavior of Start-Process cmdlet on Windows (#10830) 2020-04-17 17:19:13 -07:00
Ilya b1e998046e Fix NRE in csv commands (#12281) 2020-04-08 16:28:54 -07:00
Ilya 43e0e1a1c5 Fix default formatting for deserialized MatchInfo (#11728)
MatchInfo class has ToEmphasizedString() member method to color output line.
In remote scenario MatchInfo class is deserialized as Deserialized.Microsoft.PowerShell.Commands.MatchInfo without the method. As result default formating in remote scenario show nothing.

The fix is to directly output Line property.
2020-03-18 18:43:01 +05:00
Ilya 8ebff6a2a4 Use async streams in Invoke-RestMethod (#11095) 2020-03-18 18:40:35 +05:00
Ilya b5d4739b2a Use span-based overloads (#11884) 2020-03-18 18:38:55 +05:00
Ilya 10e7d1955b Handle the IOException in Get-FileHash (#11944) 2020-03-13 09:10:19 -07:00
Ilya 2e8ced4856 Use new string.Split() overloads (#11867) 2020-03-13 17:46:05 +05:00
Ilya 12bf5f4a0c Bring back MainWindowTitle in PSHostProcessInfo (#11885)
* Bring back MainWindowTitle in PSHostProcessInfo

* Add test
2020-03-10 09:30:53 -07:00
Ilya 45bc965af8 Fix NREs in SuspendStoppingPipeline() and RestoreStoppingPipeline() (#11870) 2020-02-20 11:57:00 -08:00
Ilya 59ad53181e Remove old dead code from FullCLR (#11886) 2020-02-20 11:39:15 -08:00
Ilya 9770477d43 Add new tests for Get-ChildItem (FileSystemProvider) (#11602) 2020-02-12 08:17:44 +05:00
Ilya 60387f1ad3 Use Dictionary.TryAdd() where possible (#11767) 2020-02-06 12:49:45 -08:00
Ilya 58d53b53fd Fix FileSystem provider error message (#11741) 2020-02-03 13:13:48 -08:00
Ilya eb47c22339 Add custom 'Selected.*' type to PSCustomObject in Select-Object only once (#11548)
Before the fix Select-Object without parameters added custom 'Selected.' type to PSCustomObject even if this type was already present in TypeNames that was a memory leak in the edge case.
The cause of the problem was that Select-Object without parameters did not create a new object but forwarded the original.
The fix is to add custom 'Selected.' type only if object is original and it has not already custom 'Selected.*' type.
2020-01-25 14:10:39 +05:00
Ilya aefb82a308 Correct casing for automatic variables (#11568)
* Remove BOM, insert newline at EOF

* Correct case of $MyInvocation special variable

* Correct case of $OFS special variable

* Correct case of $NestedPromptLevel special variable

* Correct case of $Matches special variable

* Correct case of $LASTEXITCODE special variable

* Correct case of $StackTrace special variable

* Correct case of $args special variable

* Correct case of $this special variable

* Correct case of $input special variable

* Correct case of $PSCmdlet special variable

* Correct case of $error special variable

* Correct case of $PSDefaultParameterValues special variable

* Correct case of $PSScriptRoot special variable

* Correct case of $PWD special variable

* Correct case of $null special variable

* Correct case of $true special variable

* Correct case of $false special variable

* Correct case of $PSModuleAutoLoadingPreference special variable

* Correct case of $IsLinux special variable

* Correct case of $IsMacOS special variable

* Correct case of $IsWindows special variable

* Correct case of $IsCoreCLR special variable

* Correct case of $DebugPreference special variable

* Correct case of $VerbosePreference special variable

* Correct case of $InformationPreference special variable

* Correct case of $ExecutionContext special variable

* Correct case of $HOME special variable

* Correct case of $Host special variable

* Correct case of $PID special variable

* Correct case of $PSCulture special variable

* Correct case of $PSHOME special variable

* Correct case of $PSUICulture special variable

* Correct case of $PSVersionTable special variable

* Fix false positives
2020-01-14 21:39:30 +05:00
Ilya 0dfeeb5203 Port GetProcessorArchitecture() (#11046) 2020-01-14 08:41:19 +05:00
Ilya ac069185d6 Fix NRE in ConsiceView (#11435)
Use LanguagePrimitives.TryConvertTo() as last resort to string conversion.
2020-01-14 08:33:16 +05:00
Ilya 397756a26f Skip null data in output data received handler to fix a NullReferenceException (#11448) 2020-01-09 16:08:09 -08:00
Ilya 57dd869636 Correct startup error messages (#11473) 2020-01-08 11:37:52 +05:00