Commit Graph
1046 Commits
Author SHA1 Message Date
Dongbo Wang cce64f49de Report error when PowerShell built-in modules are missing (#16628) 2022-01-12 10:02:03 -08:00
Steve Lee a9b14a13fd Add exec cmdlet for bash compatibility (#16462) 2022-01-04 14:09:27 -08:00
Steve Lee 7a2b44523b Fix web cmdlets so that an empty Get does not include a content-length header (#16587) 2022-01-03 11:20:33 -08:00
Andrew 1d1e42fd1a Merge branch 'master' into BringChangesFrom730P1 2021-12-16 13:45:37 -08:00
Andrew Menagarishvili 3f1c03d494 Merged PR 18449: Change default for $PSStyle.OutputRendering to Ansi
Cherry picked from !18333

Cherry-picked from commit `5cb8a2b3`.
2021-12-16 13:39:56 -08:00
Paul Higinbotham cadd5762ea Fix ForEach-Object -Parallel when passing in script block variable (#16564)
ForeEach-Object -Parallel using variable processing walks the script block AST to determine if the using variable was defined in the current scope, and does this by tracking the number of 'ForEach-Object -Parallel' commands in the call chain.
However, the provided script block is different, depending on whether it is passed in as a variable or via parameter binding.

$myScript = '"Hello!"'
1 | ForEach-Object -Parallel ([scriptblock]::Create($myScript))
# Script block Ast does not contain the 'ForEach-Object' command in the call chain

1 | ForEach-Object -Parallel { "Hello!" }
# Script block Ast does contain the 'ForEach-Object' command in the call chain

This change takes into account the two forms of script blocks
2021-12-14 08:11:19 +05:00
Paul Higinbotham 64d2fe26f3 Fix PSVersion parameter version checks and error messages for PowerShell 7 remoting (#16228) 2021-12-01 15:54:25 -08: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
Maksim Ivanyuk 674ef888a2 Add -HttpVersion parameter to web cmdlets (#15853) 2021-11-02 16:53:36 -07:00
Austin Farmer 107fd7ab1f Add support to web cmdlets for open-ended input tags (#16193) 2021-11-02 09:39:28 -07:00
Ryan Polley cf22188e95 Add more tests to Tee-Object -Encoding (#14539) 2021-11-01 23:06:05 -07:00
Kev Ritchie 01426b2763 Fix ConvertTo-Json -Depth to allow 100 at maximum (#16197) 2021-10-28 11:56:55 -07:00
Dongbo Wang 89dd5b8127 Remove the outdated test (#16269) 2021-10-19 13:45:36 +05:00
Travis Plunk 3893c4d55b Disallow Add-Type in NoLanguage mode on a locked down machine (#16245) 2021-10-14 14:53:41 -07: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
Paul Higinbotham 0d7ba2fe5a Fix ConvertTo-SecureString with key regression due to .NET breaking change (#16068) 2021-09-09 10:36:05 -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
Joel Sallow (/u/ta11ow) fde119e28b Use CurrentCulture when handling conversions to DateTime in Add-History (#16005) 2021-08-26 21:41:01 -07:00
Steve Lee a162856af5 Change default to OutputRendering.Host and remove OutputRendering.Automatic (#15882) 2021-08-16 14:17:07 -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
Robert Holt 2f5150f5e5 Make Measure-Object property test independent of the filesystem (#15879) 2021-08-09 15:27:09 -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
3e86f9b287 ConvertTo-Csv: Quote fields with quotes and newlines when using -UseQuotes AsNeeded (#15765)
Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: lselden <luke.selden@vbrick.com>
2021-08-04 14:47:57 -07:00
Staffan Gustafsson 1bfa1c36a7 Forwarding progress stream changes from Foreach-Object -Parallel runspaces (#14271) 2021-07-31 18:51:03 +05:00
Thomas Nieto 7777afc005 Add -PassThru parameter to Set-Clipboard (#13713) 2021-07-22 10:17:53 -07:00
Peter Schneider de5dc63379 Encoding Parameter for Tee-Object (#12135) 2021-07-22 09:26:07 +05:00
Joel Sallow (/u/ta11ow) efa9b25193 ConvertTo-Csv / Export-Csv - Serialize IDictionary objects with key/value pairs as properties (#11029) 2021-07-22 04:05:17 +00:00
Thomas Nieto 05943c6c48 Add position 0 to Write-Error parameters (#13813) 2021-07-21 18:05:06 -07:00
Steve Lee b5efe7bc39 Use $PSStyle.Formatting.FormatAccent for Format-List and $PSStyle.Formatting.TableHeader for Format-Table output (#14406) 2021-07-20 09:02:52 +05:00
Aditya Patwardhan 31a4528302 Update to .NET 6 Preview 6 and use crossgen2 (#15763) 2021-07-19 16:06:39 -07:00
William Easton 0e1160d20f Add more tests for ConvertFrom-Json (#15706) 2021-07-16 16:01:47 -07:00
Steve Lee 9fb3c2e97c Highlight using error color the exception Message and underline in PositionMessage for Get-Error (#15786) 2021-07-16 15:15:16 +05:00
Steve Lee bfb4a818bf Add support to colorize FileInfo file names (#14403) 2021-07-12 11:07:29 -07:00
Steve Lee adc236c598 Don't serialize to json ETS properties for DateTime and string types (#15665) 2021-07-12 10:56:33 -07:00
Robert Holt 0ae0b65e25 Revert "Enhance Remove-Item to work with OneDrive (Second) (#15260)" (#15546) 2021-06-11 12:32:25 -07:00
Andrew 6e73c2d4f6 Remove PSDesiredStateConfiguration v2.0.5 module (#15536)
* No longer include module with PS releases

* Updated assets/wix/files.wxs

* Moving tests out of the ps repo

* Debug 1

* Debug 2
2021-06-09 12:15:46 -07:00
Steve Lee 364e74a00a Fix Minimal progress view to handle Activity that is longer than console width (#15264) 2021-05-17 09:54:37 -07:00
Ilya 08e731398c Enhance Remove-Item to work with OneDrive (Second) (#15260) 2021-04-27 12:31:12 -07:00
Travis Plunk 720c615d04 Revert "Enhance Remove-Item to work with OneDrive (#14902)" (#15253)
This reverts commit fafc38fe5c.
2021-04-16 13:43:11 -07:00
Ilya fafc38fe5c Enhance Remove-Item to work with OneDrive (#14902) 2021-04-12 09:36:16 -07:00
PRASOON KARUNAN V 837c3e8f42 Change minimum depth to 0 for ConvertTo-Json (#14830)
* Make Depth default value to 0

* updating as per review comment
2021-04-08 12:53:32 -07:00
Steve Lee cf6876e716 Allow Set-Clipboard to accept empty string (#14579) 2021-04-01 13:03:19 -07:00
Steve Lee 5d0dadf19d Fallback to CopyAndDelete() when MoveTo() fails due to an IOException (#15077) 2021-03-25 15:11:17 -07:00
Steve Lee 22b3653bf4 Fix Move-Item for FileSystemProvider to use copy-delete instead of move for DFS paths (#14913) 2021-03-08 15:01:31 -08:00
Mariano Alipi ae5a84ea05 Move misplaced test file to tests directory (#14908) 2021-03-08 23:51:38 +05:00
Brian Lalonde c5955a5c0d #4750 Fix Get-Date -UFormat %G and %g behavior (#14555) 2021-03-01 16:37:15 -08:00