Commit Graph
2938 Commits
Author SHA1 Message Date
dependabot[bot] 21e662010f Build(deps): Bump NJsonSchema from 9.13.25 to 9.13.26 (#9184)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.13.25 to 9.13.26.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-21 14:17:35 -07:00
dependabot[bot] 4f30e15999 Build(deps): Bump NJsonSchema from 9.13.24 to 9.13.25 (#9172)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.13.24 to 9.13.25.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-21 14:16:57 -07:00
dependabot[bot] 18b8100737 Build(deps): Bump NJsonSchema from 9.13.23 to 9.13.24 (#9166) 2019-03-21 14:16:40 -07:00
dependabot[bot] 19de092977 Build(deps): Bump PowerShellGet from 2.1.0 to 2.1.2 in /src/Modules (#9145) 2019-03-21 14:14:35 -07:00
dependabot[bot] da9be4bb07 Build(deps): Bump NJsonSchema from 9.13.22 to 9.13.23 (#9136) 2019-03-21 14:14:35 -07:00
Dongbo Wang 775a2ebbdf Make 'Start-Job' throw terminating error when PowerShell is being hosted (#9128) 2019-03-21 14:14:23 -07:00
Joel Sallow (/u/ta11ow) ea4bf50623 Fix -NoEnumerate behaviour in Write-Output (#9069)
Fix is to preserve input collection type in output.
The regression was caused by #2038
2019-03-13 13:32:51 -07:00
dependabot[bot] 4258c6c514 Build(deps): Bump PowerShellGet from 2.0.4 to 2.1.0 in /src/Modules (#9110) 2019-03-13 13:20:35 -07:00
Dongbo Wang fefe5638e7 Update the task-based async APIs added to PowerShell to return a Task object directly (#9079)
Update the task-based async APIs added to PowerShell to not use the `aysnc/await` keywords, but to return a `Task` object directly.
There is nothing to continue on after the `Task.Factory.FromAsync` call in those methods, so there is not need to use `aysnc` and `await` keywords, which turns the method into a state machine class unnecessarily.
2019-03-13 13:13:11 -07:00
Kirk Munro 7482cbf5aa Add 5 'InvokeAsync' overloads and 'StopAsync' to the 'PowerShell' type (#8056) 2019-03-13 13:09:25 -07:00
Aditya Patwardhan 7747ed67d2 Update version for PowerShell.Native and hosting tests (#8983) 2019-03-13 13:02:07 -07:00
dependabot[bot] 10020ca71f Build(deps): Bump NJsonSchema from 9.13.19 to 9.13.22 (#9044)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.13.19 to 9.13.22.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-13 13:02:06 -07:00
Aditya Patwardhan b2a8a733de Remove unused cached types (#9015)
These types are not used in PowerShell code base and should be removed.

## PR Context

The dotnet 3.0.100-preview3-010406 version added overloads to `string.get_Chars` and hence we cannot resolved which overload to load. Thus, we get an type load exception.

Since we are no using this type, it is better to remove it.
2019-02-28 17:28:44 -08:00
dependabot[bot] 4de93e8b64 Build(deps): Bump Markdig.Signed from 0.15.7 to 0.16.0 (#8981) 2019-02-28 14:10:30 -08:00
Aditya Patwardhan fb05169a51 Build Global tool for PowerShell and SDK container (#8984)
* Add shim dll to redirect to appropriate runtime
* Build updates for creating global tool package
* Add building global tool to nuget.yml
* Add azure upload of nuget packages
2019-02-26 12:56:29 -08:00
Tyler James Leonhardt 23eccfd641 [feature] Add -CustomPipeName to pwsh and Enter-PSHostProcess (#8889)
This allows a user to start PowerShell up with the name of the named pipe that is used for cross process communication (I.e. Enter-PSHostProcess).
2019-02-22 23:40:03 +05:00
dependabot[bot] 63acf6812f Build(deps): Bump NJsonSchema from 9.13.18 to 9.13.19 (#8952) 2019-02-22 09:44:56 -08:00
Travis Plunk 57aeca428e Port Security bypass fixes from 6.1.3 (#8915) 2019-02-21 13:44:08 -08:00
Dongbo Wang 8617363089 Use the OperationCancellationException to replace the StoppingException in 'ConvertToJson' (#8920) 2019-02-20 23:55:39 -08:00
Steve Lee b06ad6aa61 Enable discovering modules that have names same as a culture (e.g. Az) (#8777)
Here are the major changes:
- Add logic to skip checking for possible resource directories for the first set of sub directories from the top level.
- There was an additional skip if the folder is hidden, rather than doing an explicit attribute check, change the `EnumerationOption` to skip hidden folders.
- Since the `IsPossibleModuleDirectory()` helper now only checks to see if the name matches a culture, renamed to `IsPossibleResourceDirectory()`
- When getting the default modules, we don't search recursively into individual module folders, so removed additional check for possible resource directory.
2019-02-20 12:23:27 -08:00
Adam Gauthier caf8ac6a6a Add configurable maximum depth in ConvertFrom-Json with -Depth (#8199)
Adds an optional -Depth parameter to the cmdlet which lets the user to specify a maximum depth allowed for deserialization, which will overwrite the default maximum of 1024.
2019-02-20 10:37:37 +05:00
Ilya 36117a4d55 Fix style issues in Csv cmdlets (#8894)
* Remove _delimiter
* Fix attributes
* Formatting headers
* Format properties
* Fix comments
* Fix Codacy issues
2019-02-20 08:23:44 +05:00
Mathias R. Jessen 0a570211df Flatten interface hierarchy when generating properties that implement interface properties (#8382)
`TypeBuilder.GetInterfaces()` returns only the interfaces that was explicitly passed to its constructor, so we need to flatten the interface hierarchy in order to properly support inherited interfaces.
2019-02-19 15:02:34 -08:00
Reece Dunham c14d5dd67f Remove some of the last AppVeyor references (#8867)
This removes some of the last mentions of the AppVeyor name.  Don't change the title, we don't want the word to appear in the CLs
Also problem: the last references are in the changelogs but I don't want to modify them without committee approval.  

## PR Context  

it was removed, #8686
2019-02-19 12:44:00 -08:00
dependabot[bot] a25129c392 Build(deps): Bump NJsonSchema from 9.13.17 to 9.13.18 (#8881) 2019-02-13 10:10:44 -08:00
Ilya ff3edaa2e3 Fix lgtm issues (#8843)
Add some null checks
Remove unused code
2019-02-13 16:51:05 +05:00
Tom Hvitved 5f59a9dfef Fix length check in PSSnapinQualifiedName.GetInstance() (#8837) 2019-02-08 23:50:19 +05:00
dependabot[bot] 98c360205f Build(deps): Bump Microsoft.ApplicationInsights from 2.9.0 to 2.9.1 (#8848)
Bumps [Microsoft.ApplicationInsights](https://github.com/Microsoft/ApplicationInsights-dotnet) from 2.9.0 to 2.9.1.
2019-02-08 10:22:11 -08:00
Steve Lee 5ece96a37f Don't use Win32 native APIs on non-Windows for crypto of secure string over remoting (#8746)
Remoting relies on Windows native crypto APIs to pass a secure string.  Of course these APIs don't work on non-Windows.  However, the remoting code does not expect this to fail so ends up in a hang waiting for an event that never happens.

Have not figured out how to return an error to the user in the case `Get-Credential` is called within a PSSession.  Currently it just quietly closes the remote connection.  @PaulHigin can you give a pointer to where this code would exist?  Debugging the current code, it has a bunch of error handlers which just result in the pssession being closed and not sure where throwing is appropriate.

Fix https://github.com/PowerShell/PowerShell/issues/8723

## PR Context  

Fix is to provide implementations of the Win32 native pinvoke apis that throw an exception.  The reason to do it this way is that there's a bunch of code that calls some of the APIs of the wrapper .Net class to setup structures that eventually get passed to the win32 api.  Throwing in the managed class causes other things to fail early that should work on non-Windows.
2019-02-07 15:36:13 -08:00
Steve Lee 26a58670c1 Enable creating relative symlinks on Windows with New-Item (#8783) 2019-02-07 11:44:23 -08:00
Bruce Payette 6bc6257a55 Allow .exe files to be used as IL binary modules (#7281)
Fix for #6741 Allow .exe files to be used as binary modules. Basically anywhere a .dll could be used with modules, you can now use a .exe file. Also did a little clean up, replacing constant strings with the StringLiteral values instead.
2019-02-07 11:24:06 -08:00
Staffan Gustafsson ec88045fee Reduce string allocations when formatting file system objects. (#8831)
* Reduce string allocations when formatting file system objects by caching FullName.
* Clear cache FullName when the module changes.
2019-02-07 09:23:26 +05:00
Steve Lee d9be6483f6 Move CommandNotFoundException suggestion to an experimental feature (#8805) 2019-02-06 13:59:14 -08:00
Reece Dunham 0606c27cb0 Fix many instances of CodeFactor style issue A single-line comment must not be followed by a blank line (#8825) 2019-02-05 09:47:19 -08:00
Joel Sallow (/u/ta11ow) 130298bfae Parse numeric strings as numbers again during conversions (#8681) 2019-02-04 12:22:05 -08:00
Stéphane BARIZIEN d032cb2c87 Expose file attributes of OneDrive placeholders (#8745) 2019-02-04 12:11:46 -08:00
dependabot[bot] 249c78eefc Build(deps): Bump Microsoft.ApplicationInsights from 2.8.1 to 2.9.0 (#8807) 2019-02-01 12:36:43 -08:00
dependabot[bot] f06ebb692a Build(deps): Bump PackageManagement from 1.2.4 to 1.3.1 in /src/Modules (#8800)
Updated the wxs file.
2019-01-31 16:57:50 -08:00
Steve Lee 313c8c06a1 Enable Write-Information to accept $null (#8774) 2019-01-31 13:16:34 -08:00
Joshua T c935bce1ac Adding parameter "ReplyTo" to Send-MailMessage (#8727) 2019-01-30 16:33:15 -08:00
pougetat 1d7651f233 Fix Get-Help PSTypeName issue with -Parameter when only one parameter is declared (#8754) 2019-01-30 08:55:33 -08:00
Steve Lee 3e8f85a682 Enable catching NotImplementedException when calling into RawUI for members that are not implemented 2019-01-28 12:13:15 -08:00
Joel Sallow (/u/ta11ow) db1b309800 Correctly Report impact level when SupportsShouldProcess is not set to 'true' (#8209)
Major changes are:
- Make all commands return 'ConfirmImpact.None' if `SupportsShouldProcess` is not set to `true`.
- Update some cmdlets to explicitly use `ConfirmImpact.Low`.
- Update `DefaultCommands.Tests.ps1` to test for 'ConfirmImpact' level.
2019-01-26 03:12:00 -08:00
Mark Kraus ff83206e1c Fix Request Charset Issues in Web Cmdlets (#8742)
Instantiating a new MediaTypeHeaderValue object fails when the -ContentType parameter includes a charset such as application/json; charset=utf-8. This makes it impossible to set the content encoding on web requests. Moving to Parse() ensures we actually get a proper MediaTypeHeaderValue when the charset is present, thus allowing users to set their request encoding via proper -ContentType values.
2019-01-26 12:48:47 +05:00
Aditya Patwardhan 6ccbebda27 Improve check for developer mode by checking minimum required build number (#8749)
* Improve check for developer mode by checking minimum required build number

The test would fail if the developer mode is enabled but the machine has an older build than the minimum required build.
The change adds a check for the build version in the test.

* Update test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1
2019-01-25 13:14:29 -08:00
Dongbo Wang 12547c01e8 Add complete xml docs for ConvertToJsonContext constructors (#8737) 2019-01-25 12:02:41 -08:00
Dongbo Wang c35fd70b15 Simplify the declaration of new experimental features (#8726) 2019-01-25 11:57:28 -08:00
dependabot[bot] 28042f3f44 Build(deps): Bump NJsonSchema from 9.13.16 to 9.13.17 (#8747)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.13.16 to 9.13.17.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-25 19:36:39 +05:00
Sergey Vasin a9841d98fa Make Join-String -InputObject 1,2,3 result equal to 1,2,3 | Join-String result (#8611)
Make `Join-String -InputObject 1,2,3` result equal to `1,2,3 | Join-String` result.

Fix #8610
2019-01-24 12:53:37 -08:00
xtqqczze 863528881f Use https in URLs where available (#8622)
Use https in URLS across the repository where the domain serves content by https.
2019-01-24 12:50:11 -08:00