Commit Graph
269 Commits
Author SHA1 Message Date
Dongbo Wang c4ae347dc9 Avoid extra SMB queries when formatting file names (#28038) 2026-10-09 09:35:18 -07:00
Anam Navied 85efec2e1e Improve validation for Copy-Item -FromSession (#28006) 2026-09-11 13:41:30 -07:00
Dongbo Wang 9337fa1411 Fix the scripts used for Copy-Item -FromSessoin/-ToSession scenarios and also enable tests (#27773)
- Fix the scripts used for `Copy-Item -FromSessoin/-ToSession` and `PSEdit`. They use `-Encoding Byte`, which only works in PS5.1. In PS 7+, we need to use `-AsByteStream` instead. So, those scenarios (copy alternate data stream to/from remote PS 7 session and edit file from a remote PS 7 session) have been broken for a long time.
- The remote tests for `Copy-Item` have always been disabled. This PR re-enables those tests for Windows (the `HelperRemoting` module only works on Windows).
2026-08-18 16:01:04 -07:00
Patrick MeineckeandTravis Plunk 2475feb876 Enable usage in AppContainers (#27266)
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2026-04-20 11:49:52 -05:00
xtqqczze b4f42a07e0 Replace stackallocs with collection expressions (#25803) 2025-10-17 04:38:05 +00:00
xtqqczze 5cdafbc4c7 Enable CA1858: Use 'StartsWith' instead of 'IndexOf' (#26107) 2025-10-08 08:22:54 +05:00
Anam Navied 1e46d89c63 Add Codeql Suppressions (#25943) 2025-09-03 11:14:44 -07:00
Tadas Medišauskas b3bc4ff4e0 Use absolute path in FileSystemProvider.CreateDirectory (#24615) 2025-05-13 11:29:48 +05:00
GameMicrowave fcc1833963 Treat -Target as literal in New-Item (#25186) 2025-05-12 16:22:29 +05:00
Kris Borowinski 8854c00ec2 Fix New-Item -Force to error on invalid directory name (#24936) 2025-02-07 22:32:23 +05:00
xtqqczze 1790f3a3e9 Remove redundant Attribute suffix (#24940) 2025-02-07 22:18:29 +05:00
Armaan Mcleod 2a1d17eda6 Update IndexOfAny calls with invalid path/filename to SearchValues<char> for more efficient char searching (#24896) 2025-01-30 17:42:57 +05:00
Ryan Yates 61e9f5dcc2 Return correct FileName property for Get-Item when listing alternate data streams (#18019) 2025-01-02 16:45:57 +05:00
Matej Kafka b18eacaa83 Resolve symbolic link target relative to the symbolic link instead of the working directory (#15235) (#20943) 2024-12-03 15:00:00 -08:00
SpyGod be59e5e80e Delay progress bar in Copy-Item and Remove-Item cmdlets (#24013) 2024-08-20 08:18:58 +05:00
Steve Lee 2d83b95539 Fix Move-Item to throw error when moving into itself (#24004) 2024-07-08 23:53:17 +00:00
Jordan Borean 720f145e28 Fix progress calculation on Remove-Item (#23869) 2024-07-01 15:40:49 -07:00
Armaan Mcleod a284fd482b Added progress bar for Remove-Item cmdlet (#20778) 2024-05-13 13:52:27 -04:00
Steve Lee 371ceff3b5 Fix Test-Path -IsValid to check for invalid path and filename characters (#21358) 2024-04-02 09:42:40 -07:00
MartinGC94 7ad403962c Add DirectoryInfo to the OutputType for New-Item (#21126) 2024-02-01 09:57:38 -08:00
Armaan Mcleod 103c945c32 Fix -OlderThan/-NewerThan parameters for Test-Path when using PathType and date range (#20942) 2023-12-20 22:32:57 +05:00
Travis Plunk 687383bcc1 Block getting help from network locations in restricted remoting sessions (#20593) 2023-10-31 16:06:15 -07:00
Steve Lee 581ee201a7 Fix Copy-Item progress to only show completed when all files are copied (#20517) 2023-10-19 10:36:47 -07:00
Aditya Patwardhan f71404d834 Update .NET SDK to version 8.0.100-rc.1.23455.8 (#20269) 2023-09-20 14:33:49 -07:00
Sean Wheeler 5595072568 Change docs.microsoft.com to learn.microsoft.com (#19994) 2023-07-17 15:54:17 -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
CarloToso 69e9b439fd Fix codefactor if part 5 (#19286) 2023-03-16 22:02:42 +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
CarloToso c48e5cbcca Use ArgumentException.ThrowIfNullOrEmpty() in more places (#19213) 2023-02-27 14:42:07 -08:00
Dongbo Wang 77fcd471bb Revert a few change to not use 'ArgumentNullException.ThrowIfNull' (#19151) 2023-02-22 13:31:14 -08:00
spaette ec0eb22062 Fix typos in comments (#19064) 2023-02-03 10:40:43 +05:00
Paul Higinbotham f3485228f7 Ignore expected error for file systems not supporting alternate streams (#19065) 2023-01-31 08:23:44 -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 1c27a0ceac Add progress to Copy-Item (#18735) 2023-01-25 16:34:44 +05:00
CarloToso 0ee317a157 Use interpolated strings 3 (#18979) 2023-01-21 17:56:57 +05:00
James Truher [MSFT] 4f57804f46 Fix up all comments to be in the proper order with proper spacing (#18619) 2023-01-03 12:12:42 -08:00
CarloToso b48943ce31 Replace ArgumentNullException(nameof()) -> ArgumentNullException.ThrowIfNull() 2 (#18792) 2022-12-16 16:46:45 +05:00
Ilya 218c6cea15 Unify CreateFile pinvoke in SMA (#18751) 2022-12-15 11:05:07 +05:00
CarloToso 2ddc63f151 Replace ArgumentNullException(nameof()) -> ArgumentNullException.ThrowIfNull() (#18784) 2022-12-14 18:30:33 +05: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 07175ae0ff Replace DllImport with LibraryImport for WNetAddConnection2 (#18721) 2022-12-05 23:50:22 +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 8bc9fdb2a1 Replace DllImport with LibraryImport in SMA 2 (#18543) 2022-11-22 22:22:14 +05:00
Ilya b84652745c Replace DllImport with LibraryImport in SMA 1 (#18520) 2022-11-12 16:48:27 +05:00
xtqqczze 1688b0fc35 Replace UTF8Encoding(false) with Encoding.Default (#18356) 2022-11-07 10:07:36 -08:00
Ilya 8965af3d52 Remove some static constants from Utils.Separators (#18154) 2022-10-27 15:25:41 -07:00