Commit graph

4172 commits

Author SHA1 Message Date
Daryl Graves 321b726306
Format-Wide: Fix NullReferenceException (#15990) 2021-08-25 09:45:00 -07:00
Robert Holt a4d14576b3
Make the native command error handling optionally honor ErrorActionPreference (#15897) 2021-08-24 15:27:22 -07:00
Aditya Patwardhan ab5e1779a3
Revert "Use GetValueOrDefault() for nullable PSLanguageMode (#13849)" (#15980) 2021-08-23 17:20:29 -07:00
James Truher [MSFT] c39d672560
Remove 4 assertions which cause debug build test runs to fail (#15963) 2021-08-22 10:49:07 -07:00
arfy slowy 55855fbe5d
Fix spelling in XML docs (#15939) 2021-08-17 09:01:04 +05:00
Steve Lee a162856af5
Change default to OutputRendering.Host and remove OutputRendering.Automatic (#15882) 2021-08-16 14:17:07 -07:00
Dongbo Wang 286f12a37c
Update .NET adapter to handle interface static members properly (#15908) 2021-08-14 07:56:14 -07:00
Dongbo Wang 05e64135d2
Don't use ArgumentList when creating COM object as it's not applicable to the COM parameter set (#15915) 2021-08-14 07:32:51 -07:00
Steve Lee dda6c156d2
Fix $PSStyle list output to correctly show TableHeader (#15928) 2021-08-13 15:40:07 -07:00
Paul Higinbotham 1ec61d955c
Remove implicit remoting batch experimental feature (#15863)
It was decided by committee (#15862) to remove this experimental feature. It was an interesting idea but the implementation did not cover important cases, and could not be updated easily to do so.
2021-08-13 08:34:31 +05: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
Paul Higinbotham e2c23fc5bd
Add error catch for unauthorized access when removing AppLocker test files (#15881) 2021-08-10 11:03:53 -07:00
Steve Lee cced56d75a
Make PS-Committee reviewed experimental features stable (#15864) 2021-08-09 14:01:57 -07:00
dependabot[bot] 0a342601c8
Bump NJsonSchema from 10.5.1 to 10.5.2 (#15891)
Bumps NJsonSchema from 10.5.1 to 10.5.2.

---
updated-dependencies:
- dependency-name: NJsonSchema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-09 17:37:37 +05:00
dependabot[bot] a4181ab57e
Bump NJsonSchema from 10.5.0 to 10.5.1 (#15883)
Bumps NJsonSchema from 10.5.0 to 10.5.1.

---
updated-dependencies:
- dependency-name: NJsonSchema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-06 13:09:51 +05:00
xtqqczze 58483e1366
Replace GetFiles in CompletionCompleters (#14329) 2021-08-05 16:35:38 -07:00
xtqqczze 01a4714b76
Enable CA1067: Override Object.Equals(object) when implementing IEquatable<T> (#13871)
* Enable CA1067: Override Object.Equals(object) when implementing IEquatable<T>

* Group Equals methods

* Reformat xml documentation

* Update src/System.Management.Automation/engine/EventManager.cs

Co-authored-by: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>

Co-authored-by: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
2021-08-05 16:32:33 -07:00
xtqqczze 44595a40ec
Fix CA1052 in TypeCatalogGen (#15840) 2021-08-05 16:21:46 -07:00
dependabot[bot] ce6f04aa8a
Bump Microsoft.ApplicationInsights from 2.17.0 to 2.18.0 (#15842)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 15:23:54 -07:00
Ilya 45adfee558
Enhance Remove-Item to work with OneDrive (#15571) 2021-08-05 11:41:55 -07:00
Robert Holt 920427260c
Make global tool entrypoint class static (#15880) 2021-08-05 17:44:52 +00:00
dependabot[bot] 61af30f3b1
Bump NJsonSchema from 10.4.6 to 10.5.0 (#15874)
Bumps NJsonSchema from 10.4.6 to 10.5.0.

---
updated-dependencies:
- dependency-name: NJsonSchema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 13:55:13 +05:00
Steve Lee 2ae0e4d9dd
Update ServerRemoteHost Version to be same as PSVersion (#15809) 2021-08-04 15:01:18 -07:00
Ilya aaaa0f2baa
Thread-safe HttpKnownHeaderNames initialization (#15519) 2021-08-04 15:00:26 -07:00
lselden 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
Steve Lee 6933c5b473
Only allow -File to accept .ps1 scripts on Windows (#15859)
Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>
2021-08-03 13:43:00 -07:00
Staffan Gustafsson 1bfa1c36a7
Forwarding progress stream changes from Foreach-Object -Parallel runspaces (#14271) 2021-07-31 18:51:03 +05:00
dependabot[bot] 1a55208590
Bump NJsonSchema from 10.4.5 to 10.4.6 (#15822)
Bumps NJsonSchema from 10.4.5 to 10.4.6.

---
updated-dependencies:
- dependency-name: NJsonSchema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-30 21:18:45 +05:00
xtqqczze a77be13227
Partially revert changes to code style src/Microsoft.Management.UI.Internal/ (#15839) 2021-07-29 12:32:21 -07:00
xtqqczze 0f2f23f67a
Enable IDE0049 PreferBuiltInOrFrameworkType (#14491) 2021-07-28 12:39:14 -07:00
xtqqczze 055b7f3003
Fix CA1052 for public API to make classes static when they only have static methods (#15775) 2021-07-28 12:28:24 -07:00
xtqqczze 3733a0bb37
Avoid unnecessary StringCollection allocation in formatting code (#15832) 2021-07-27 11:18:53 -07:00
Steve Lee 5e15f66f97
Add validation to $PSStyle to reject printable text as ANSI escape sequence (#15825) 2021-07-27 17:14:20 +00: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
James Truher [MSFT] ac762c1cce
Add a Windows mode for native commands that allows some commands to use legacy argument passing (#15408) 2021-07-20 23:10:04 +00:00
Ilya f18a542bf6
Remove consolehost.proto file (#15741) 2021-07-20 14:53:33 -07:00
xtqqczze 9ceed485af
Implement IDisposable for ConvertToJsonCommand (#15787) 2021-07-20 13:26:28 -07:00
xtqqczze 71f62c7cf3
Fix IDisposable impl for CommandPathSearch (#15793) 2021-07-20 09:30:48 +05: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
xtqqczze 883ca98dd7
Seal private classes (#15725)
* Seal private classes

* Fix CS0509

* Fix CS0628
2021-07-19 14:09:12 +05: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
xtqqczze 4dd25a432c
Enable IDE0029: UseCoalesceExpression (#15770)
Enable [IDE0029: UseCoalesceExpression](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0029)
2021-07-15 09:17:46 +05:00
dependabot[bot] b7d6ef2e50
Bump NJsonSchema from 10.4.4 to 10.4.5 (#15769) 2021-07-14 11:13:10 -07:00
Ilya 0f3bc73d9a
Implement a completion for View parameter of format cmdlets (#14513) 2021-07-13 17:32:48 +00:00
xtqqczze 00bc0f6d29
Enable IDE0030: UseCoalesceExpressionForNullable (#14289) 2021-07-13 10:13:49 -07: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
Aditya Patwardhan 6d09c6e40a
Fix CA1846 and CA1845 for using AsSpan instead of Substring (#15738) 2021-07-09 10:55:23 -07:00
xtqqczze 6d08db612e
Use List<T>.RemoveAll to avoid creating temporary list (#15686) 2021-07-07 20:54:44 -07:00
xtqqczze acb4c4acff
Fix HyperVSocketEndPoint.ServiceId setter (#15704) 2021-07-07 16:52:36 +05:00
xtqqczze 03b07a0062
Enable IDE0044: MakeFieldReadonly (#13880)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
2021-07-07 09:33:19 +05:00
Konstantin Gukov 8dcd5a2e1c
Use nameof to get parameter names when creating ArgumentNullException (#15604) 2021-07-05 22:04:13 -07:00
xtqqczze 4c2d6dcfca
Make classes sealed (#15675)
Fix [RCS1225](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1225.md)
2021-07-04 16:49:52 +05:00
Steve Lee e6ee841a69
Add @jborean93 to Remoting Working Group (#15683) 2021-07-01 08:57:57 +05:00
Dongbo Wang 14f25c92e7
Test if a command is 'Out-Default' more thoroughly for transcribing scenarios (#15653) 2021-06-28 11:26:14 -07:00
xtqqczze b77bbf8640
Enable CA1812 (#15674)
[CA1812: Avoid uninstantiated internal classes](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812)
2021-06-27 20:16:17 +05:00
xtqqczze 1e992c5e53
Replace Single with First when we know the element count is 1 (#15676) 2021-06-25 17:19:05 -07:00
xtqqczze 7a39acb527
Skip analyzers for Microsoft.Management.UI.Internal (#15677) 2021-06-25 22:59:26 +05:00
xtqqczze 756aef9a86
Fix CA2243: Attribute string literals should parse correctly (#15622)
* Update V2Cmdlets.csv
2021-06-25 17:59:30 +05:00
xtqqczze a3366b880a
Fix CA1309: Use ordinal StringComparison in CertificateProvider (#14352) 2021-06-25 09:01:59 +05:00
Jason Helmick 170a226689
Add Microsoft.PowerShell.Crescendo to telemetry allow list (#15372) 2021-06-24 12:30:40 -07:00
Steve Lee 375be2e705
Add DetailedView to $ErrorView (#15609) 2021-06-22 13:35:38 -07:00
MartinGC94 77054ff586
Fix splatting being treated as positional parameter (#14623) 2021-06-15 16:56:14 -07:00
Al Idian 6eae114f5a
Correct parameter reference passed to exception (#15580) 2021-06-15 22:29:31 +05:00
Al Idian 7b933d0cc3
Correct and improve XML comments (#15568) 2021-06-15 09:05:21 -07:00
Francesco Saltori a70f915411
Retrieve ProductVersion using informational version attribute in AmsiUtils.Init() (#15527) 2021-06-14 12:04:36 -07:00
Konstantin Gukov da578e5f34
Do not stop powershell when can't create telemetry mutex. (#15574) 2021-06-14 11:59:20 -07:00
dependabot[bot] 83639cb344
Bump Microsoft.CodeAnalysis.CSharp from 3.10.0-3.final to 3.10.0 (#15573) 2021-06-14 11:49:32 -07:00
Steve Lee 9aa9a75cad
Fix retrieving dynamic parameters from provider even if globbed path returns no results (#15525) 2021-06-14 11:09:26 -07:00
Ilya f570029986
Enable nullable: System.Management.Automation.ICommandRuntime (#15566) 2021-06-14 10:57:34 -07:00
Robert Holt 0ae0b65e25
Revert "Enhance Remove-Item to work with OneDrive (Second) (#15260)" (#15546) 2021-06-11 12:32:25 -07:00
Dongbo Wang e2ee8e7e1f
Clean up code regarding AppDomain.CreateDomain and AppDomain.Unload (#15554) 2021-06-10 09:16:05 -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
Dongbo Wang 4aaed08955
Ignore all exceptions when disposing an instance of a subsystem implementation (#15511) 2021-06-07 09:59:24 -07:00
dinhngtu ea19ceac4a
Wait for SSH exit when closing remote connection (#14635) 2021-06-03 13:19:11 -07:00
Ikko Ashimine 6018d6b183
Fix typo in FileSystemProvider.cs (#15445) 2021-06-03 13:15:32 -07:00
Francesco Saltori 088eb6d039
Replace ProcessModule.FileName with Environment.ProcessPath and remove PSUtils.GetMainModule (#15012) 2021-06-03 12:32:55 -07:00
Robert Holt 50d850740b
Add PipelineStoppedException notes to PowerShell API (#15324) 2021-06-03 12:27:41 -07:00
dependabot[bot] 303cf518a0
Bump NJsonSchema from 10.4.3 to 10.4.4 (#15459)
Bumps NJsonSchema from 10.4.3 to 10.4.4.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-27 14:03:44 -07:00
Staffan Gustafsson 6361141f8e
Enable nullable: System.Management.Automation.IDispatch (#14185) 2021-05-26 11:08:27 +05:00
Aditya Patwardhan 7ead137407
Update to .NET Preview 6 SDK (#15452) 2021-05-25 19:24:28 -07:00
MartinGC94 2fc3826dd3
Add completions for comment-based help keywords (#15337) 2021-05-25 13:36:53 -07:00
dependabot[bot] 058d03dadf
Bump NJsonSchema from 10.4.3 to 10.4.4 (#15385)
Bumps NJsonSchema from 10.4.3 to 10.4.4.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 18:14:15 -07:00
Andrew 8d017d8a75
Move cross platform DSC code to a subsystem (#15127) 2021-05-20 17:06:59 -07:00
Dongbo Wang 5febcad3db
Update prediction interface to provide additional feedback to a predictor plugin (#15421) 2021-05-20 15:52:13 -07:00
Staffan Gustafsson e927e94aed
Enable nullable: Microsoft.PowerShell.Commands.IRegistryWrapper (#14177) 2021-05-20 12:46:03 +05:00
Staffan Gustafsson 562f4f3d1a
Enable nullable: System.Management.Automation.IResourceSupplier (#14159) 2021-05-19 22:11:52 +05:00
Staffan Gustafsson 91b2904ca7
Enable nullable: System.Management.Automation.Language.ICustomAstVisitor (#14191) 2021-05-19 08:48:49 +05:00
Staffan Gustafsson 6d4420f4b9
Enable nullable: System.Management.Automation.Provider.ISecurityDescriptorCmdletProvider (#14162) 2021-05-18 21:46:00 +05:00
Staffan Gustafsson 94aa68d30f
Enable nullable: System.Management.Automation.Provider.ICmdletProviderSupportsHelp (#14150) 2021-05-18 21:09:00 +05:00
Staffan Gustafsson 77f25bf2a7
Enable nullable: System.Management.Automation.IDynamicParameters (#14153) 2021-05-18 20:58:39 +05:00
Staffan Gustafsson c547ccd478
Enable nullable: System.Management.Automation.Interpreter.ILightCallSiteBinder (#14156) 2021-05-18 20:57:27 +05:00
Staffan Gustafsson e2364b78b5
Enable nullable: System.Management.Automation.Language.IScriptPosition (#14161) 2021-05-18 20:55:29 +05:00
Staffan Gustafsson 64fb8c2311
Enable nullable: System.Management.Automation.IInspectable (#14155) 2021-05-18 19:53:21 +05:00
xtqqczze 5abb90f21a
Avoid allocation in LanguagePrimitives.UpdateTypeConvertFromTypeTable (#15168) 2021-05-17 11:01:07 -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