Commit graph

2744 commits

Author SHA1 Message Date
kwkam caad7ed471 Fix Rename-Item -Path with wildcard char (#7398) 2018-11-09 11:08:26 -08:00
John Eismeier 4118fd2829 Propose fix some typos (#8206) 2018-11-09 08:33:24 +05:00
Paal Braathen 2e89efa1bc When using Start-Transcript and file exists, empty file rather than deleting (#8131) 2018-11-07 08:34:42 +05:00
Steve Lee 7b243d59da Remove ShouldProcess from Format-Hex (#8178) 2018-11-06 11:31:43 +05:00
Paul Higinbotham acf5eb5053 Adding verbose output for experimental implicit remoting batching feature (#8166) 2018-11-05 15:22:46 -08:00
Aditya Patwardhan b5ab2ddd40 Load assembly from module base path before trying to load from GAC (#8073)
[Breaking Change]
When a binary module has the module assembly in GAC, we load the assembly from GAC before trying to load it from module base path.

This change attempts to load it from module base path before looking up in GAC.
2018-11-05 10:41:53 -08:00
dependabot[bot] d165f5dcbf Bump NJsonSchema from 9.11.1 to 9.12.0 (#8183)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.11.1 to 9.12.0.
2018-11-05 10:22:31 -08:00
Robert Holt 5d06fba366 Refactor module version/GUID comparison logic (#7125) 2018-11-01 13:41:51 -07:00
PRASOON KARUNAN V f59353d5d9 Error message enhancement for clear-content cmdlet when targeting a directory (#8134) 2018-11-01 08:56:45 +05:00
Kirk Munro d9803b24d8 Make PSVersionInfo.PSVersion and PSVersionInfo.PSEdition public (#8054) 2018-10-31 09:09:53 +05:00
Ilya ecb467c791
Use DefaultPathSeparator char instead of DefaultPathSeparatorString (#8082)
In:
* SessionStateLocationAPIs
* FileSystemProvider
* LocationGlobber
* NavigationProviderBase
2018-10-31 08:26:15 +05:00
Paul Higinbotham 20f3a6a337 Experimental feature: Implicit remoting batching perf improvement (#8038) 2018-10-30 09:55:39 -07:00
Steve Lee 1aa5bb3576 Honor -OutputFormat if specified in noninteractive, redirected, encoded command used with pwsh (#8115)
[Breaking Change]

There is specific code that sets the `OutputFormat` to xml if pwsh is run non-interactive, with redirected output, and the command was encoded.  However, it ignored whether OutputFormat was specified.  Fix is to track whether `-OutputFormat` was used and respect that value rather than defaulting to xml.

Fix https://github.com/PowerShell/PowerShell/issues/5912
2018-10-29 17:51:21 -07:00
Ilya c36e4ad983 Cleanup: Remove clone of command-line args array (#7910) 2018-10-29 15:32:50 -07:00
Steve Lee b1e2745b53 move processing of -WorkingDirectory before processing of profiles (#8079) 2018-10-29 13:56:13 -07:00
Steve Lee b27380dc51 Enable case-insensitive tab completion for files and folders on case-sensitive filesystem (#8128) 2018-10-28 09:48:49 +05:00
Ilya 0e19042848
Reduce allocations in Get-Content cmdlet (#8103)
* Simplify main loop in ReadDelimited() by bringing out raw stream code
* Remove unused constructor
* Allocate buffer for current line once in constructor
* Use Span buffer to significantly reduce allocations
* Optimize Boyer-Moore. Use simple mapping Unicode chars to byte. It works well for common text files with chars from one-two languages.
2018-10-26 08:55:54 +05:00
Steve Lee 9141b11c5e Enable Set-Location -LiteralPath to work with folders named "-" and "+" (#8089) 2018-10-24 09:37:59 +05:00
Staffan Gustafsson 3e4fa87901 Add a path for checking ZoneInformation without throwing an exception (#8025) 2018-10-24 09:34:15 +05:00
Steve Lee 082c3b0bae Enable Add-Content to share read access to other tools while writing content (#8091) 2018-10-23 16:27:53 -07:00
Andrew Stanton bf2667352a Fix typo in -icontains description from"incase sensitive" to "case insensitive" (#7840) 2018-10-23 13:32:51 -07:00
dependabot[bot] 3c4d64c3e9 Bump Microsoft.ApplicationInsights from 2.8.0 to 2.8.1 (#8104) 2018-10-23 11:31:08 -07:00
Patrick Meinecke 57bf508fec Fix static method invocation type inference (#8018)
Fixes type inference for static method invocations (e.g. [powershell]::Create()).
2018-10-23 16:58:31 +05:00
Ilya 0a4f33a872
Replace StringComparision.CurrentCulture with StringComparision.Ordinal (#8068) 2018-10-21 16:11:08 +05:00
Steve Lee 3ceb1c17ef Fix logic to not rely on build number to determine whether to output formatdata (#8063) 2018-10-19 12:45:03 -07:00
Ilya 0bce3e0e0d
Style fixes in Format-Hex (#8083) 2018-10-19 19:16:13 +05:00
Steve Lee 4e5e3900f6 Allow dynamic parameter to be returned even if path matches nothing (#7957) 2018-10-18 11:44:08 -07:00
Ilya f1e2136a2b
Add -Name, -NoUserOverrides and -ListAvailable parameters to Get-Culture cmdlet (#7702)
Add new parameters in Get-Culture cmdlet:
-Name - to allow retrieving a specific culture
-NoUserOverrides - ignore user changes for current culture
-ListAvalable - to allow retrieving all cultures supported on the platform
2018-10-18 17:34:34 +05:00
Ilya 745e305ac5
Add new Offset and Count parameters to Format-Hex and refactor the cmdlet (#7877)
- Add new Offset and Count parameters.
- Modify ByteCollection class to support offsets up to UInt64.MaxValue size.
- Hide/obsolete Raw parameter because the behavior is by default.
- Optimize conversion to bytes to reduce allocations for large input data.
2018-10-18 10:03:59 +05:00
Staffan Gustafsson 9c4340ab25 Make Select-String faster by not doing extra work (#7673)
By not tracking context in the common case where Context size is 0 (using new NoContextTracker class), and by not checking if the full name of a FileInfo is a Directory, about 30% of the execution time is cut when piping files into Select-String.
2018-10-18 09:46:07 +05:00
Joel Sallow 33f2f0faaf Add Type Inference for $_ / $PSItem in catch{ } blocks (#8020) 2018-10-18 09:42:16 +05:00
Aditya Patwardhan 1e31e707c8 Merged PR 5363: Version and doc changes
Version and doc changes
2018-10-15 20:24:00 +00:00
dependabot[bot] e5a4177736 Bump PackageManagement from 1.2.1 to 1.2.2 in /src/Modules (#8029) 2018-10-15 12:34:52 -07:00
Steve Lee 81b67c924a Add prompt to the use of less in the function 'help' to instruct user how to quit (#7998) 2018-10-12 15:37:16 -07:00
dependabot[bot] 9f736b98ed Bump PackageManagement from 1.1.7.2 to 1.2.1 in /src/Modules (#8014) 2018-10-12 15:28:06 -07:00
Steve Lee 8bca5a6017 Allow root node of format.ps1xml to have attributes that are ignored (#7987) 2018-10-12 11:31:21 -07:00
Steve Lee b62e152f4d Improve error message on non-Windows when importing clixml with securestring (#7997) 2018-10-12 10:56:35 -07:00
Dongbo Wang 9b94f18ccf
Fix BeginInvoke/EndInvoke to return results when Stop or BeginStop/EndStop was called previously (#7917)
The root cause is that `OutputBuffer` is not cleaned up (set to `null`) in `Stop` and `BeginStop/EndStop` when the powershell instance owns the `OutputBuffer` object. Since the pipeline has been intentionally stopped by the caller, the `OutputBuffer` should be set to `null` as well when it's owned by the PowerShell instance, just like how it's cleaned up in `EndInvoke`.
2018-10-12 10:46:57 -07:00
dependabot[bot] 60874d1734 Bump Microsoft.ApplicationInsights from 2.7.2 to 2.8.0 (#8002)
Bumps [Microsoft.ApplicationInsights](https://github.com/Microsoft/ApplicationInsights-dotnet) from 2.7.2 to 2.8.0.
- [Release notes](https://github.com/Microsoft/ApplicationInsights-dotnet/releases)
- [Changelog](https://github.com/Microsoft/ApplicationInsights-dotnet/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/Microsoft/ApplicationInsights-dotnet/compare/2.7.2...2.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-11 14:02:20 -07:00
Ilya 17fd2e9392 Revert "Only display properties with values for MeasureInfo (#7104)" (#7754)
This reverts commit 87ccd0aa40 until
security review of the public api has been completed.
2018-10-11 12:48:46 -07:00
Patrick Meinecke 680ad9c835 Fix Property and ScriptBlock expressions in EntrySelectedBy tags within custom controls (#7913)
Send the current object when evaluating `EntrySelectedBy` in a custom control definition
2018-10-11 21:09:39 +05:00
Joel Sallow e660e9623a Add support for Byte Literals (#7901)
- Adds y suffix that is used to specify a numeric literal as the sbyte data type. 
- Can be combined with the existing u suffix as uy to specify the byte data type.
2018-10-11 17:40:58 +05:00
dependabot[bot] 25704eb1a3 Bump NJsonSchema from 9.11.0 to 9.11.1 (#7990)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.11.0 to 9.11.1.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-10 15:41:29 -07:00
Steve Lee 339abe0609 Fix Enter-PSSession -ContainerId for the latest Windows (#7883)
Hyper-V team changed the type used to get the `runtimeid`. We need to check for new type and fall back to old type.
2018-10-09 14:24:25 -07:00
Christoph Bergmeister [MVP] e69ff5ed55 Update Markdig.Signed NuGet package from 0.15.3 to 0.15.4 (#7960) 2018-10-08 08:59:45 +05:00
Ilya 09f5471346
Use params in ImportPSModule (#7933) 2018-10-05 09:31:32 +05:00
Topping 20b2e3df37 No longer skips a column without name if double quote delimiter is used in Import-Csv (#7899) 2018-10-05 09:15:56 +05:00
Vijayakrishna Pondala 97bcd8c88e Remove unused commented out code (#7935) 2018-10-04 15:17:38 +05:00
Ilya 8655576b58 Remove last hang term (#7931) 2018-10-03 10:45:36 -07:00
Stephen Owen 0789fb123a Updating incorrect example of PowerShell.Create() (#7926) 2018-10-03 20:20:38 +05:00