When InitialSessionState initializes it tries to SetLocation to current working directory,
but if the directory name contains PowerShell wildcard characters, it fails and reverts
to $PSHOME.
The change affects Set-Location in that if the path exists (even if containing wildcard characters), just use it. It is a breaking change.
- Add Link controller to WebListener
- Replace HttpListener Link tests with WebListener
- Update WebListener Documentation
- Enable cross-platform multiple Link header tests
Make PowerShell Core reads group policy settings from different registry keys (Windows only) and the configuration files (both Windows and Unix).
- On Windows, move to different GPO registry keys.
- On both Windows and Unix, read GPO related settings from the configuration file `powershell.config.json`.
- On Windows, the policy settings in registry take precedence over the configuration file.
- Enable policy controlled logging and transcription on Unix.
•Replaces all remaining test that rely on httpbin.org
•Adds Put, Post, Patch, and Delete tests to WebListener by means of routes to Get test and modifications to the Get controller.
•Adds responsephrase option to the Response test to accommodate error message tests
•removed redundant GET tests from irm and iwr tests.
•Fixed markdown linting errors in README.md for WebListener
refactor code to restore pester into a separate function called Restore-PSPester
update message on what to do when pester is missing
Add ability for get-psoptions to default to new-psoptions
fix an issue with publish-pstesttools when a build has not been run since build.psm1 has been imported (try to use the default options)
make start-pspester use the last build, not just use the default options
fix an issue in restore caused some files not to be removed
Underpinnings to make calling of Extension methods /Linq easier from PowerShell.
Enables the following that previously had to be done via reflection.
class M {
[int] Twice([int] $value) { return 2 * $value }
[int] DoubleSum([int[]] $values) {
return [Linq.Enumerable]::Sum($values, [M]::Twice)
}
}
Each PSMethod is created as with a unique type for the combinations of method signatures in the MethodInfos it represents.
PSMethod<T> where T is a MethodGroup<>, potentially recursive in the last template argument.
This way, we can determine by just looking at the type of a PSMethod if there exists a conversion from the PSMethod to a delegate.
Remove unnecessary check for Paths.count > 0 as there is code later to use the current working directory since -Path is not a mandatory parameter.
Updated ShouldProcess to output the internal action on adding paths rather than the user action (which is the cmdlet name).
Updated tests to not specify -Path
Fix#5594
closes#2662
This feature adds the ability to restrict the SSL/TLS protocol used when making the web request. In 5.1 the user could make use of .NET API's to enforce this on the Web Cmdlets. With the move to HttpClient in PowerShell Core, those APIs have no impact. The user still has requirements to ensure specific protocols are used.
The public enum WebSslProtocol is added as a wrapper to the underlying SslProtocols enum. Neither it nor SecurityProtocolType can be used because Ssl3 and Ssl2 are not supported by HttpClientHandler.SslProtocols. While it may not be intuitive to a PowerShell user to use -bor or "Tls, Tls11" to set multiple options, the general use case for this will be a single protocol.
Adds -SslProtocol parameter to Web Cmdlets
Adds WebSslProtocol Enum to support limited subset of SslProtocol enum supported by HttpClientHandler
Adds TLS 1.1 and TLS 1.0 listening ports to WebListener
- Add an error when a user tries to use `-Credential` (legacy usage without `-Authentication`) or `-UseDefaultCredentials` over a non-HTTPS URI
- User can bypass error with `-AllowUnencryptedAuthentication`
- `-UseDefaultCredentials` can only be reliably tested on Windows as support on other platforms depends on a Kerberos infrastructure.
- Add `/Auth/` tests to WebListener for challenge authentication Basic, Negotiate, and NTLM
Incidentally, this increases test coverage for the web cmdlets as `-Credential` and `-UseDefaultCredentials` were not being tested.