Add two properties in `ProviderInfo` class: `ItemSeparator` and `AltItemSeparator`.
On windows, the default values for those two properties are `ItemSeparator = '\'` and `AltItemSeparator = '/'`.
On unix, the default values for those two properties are `ItemSeparator = '/'` and `AltItemSeparator = '\'`.
Registry provider is the only exception, both properties for it have the value `\`.
VSTS produces a warning if the result set is 0, we will skip uploading this to avoid the warning and better support automation scenarios.
## PR Context
We have automation which checks our test results and if the result set is 0 for that file, a warning is produced. This PR will avoid uploading that file into the test results (which is valid, as there are no run tests). We will still add the file to our artifact list for completeness.
Adds warning messages to the Enable-PSRemoting and Disable-PSRemoting cmdlets that informs the user that the cmdlets only affect PSCore6 remoting endpoint configurations and not Windows PowerShell configurations.
PR Context
As documented, Enable-PSRemoting and Disable-PSRemoting affects all PowerShell remoting on a Windows system, and Windows users will likely expect the cmdlets to continue working this way in PSCore6. However, these cmdlets currently affect only PSCore6 remoting endpoints when run in PSCore6 and have no effect on Windows remoting endpoints.
Make the Linux CI build once and then run the tests on 4 different machines, by tag.
## PR Context
Running in parallel allows us to run all tests in about the same amount of clock time
On Unix systems, fallback to plaintext manipulation instead of using the DPAPI which is not available.
## PR Context
Currently, existing scripts that use SecureString cmdlets fail with an error complaining about crypt32.dll not being available. This change allows these cmdlets to be used, but there is no encryption of the string.
.Net already [states](https://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netcore-2.1#remarks) that the contents of a SecureString are not encrypted on .Net Core.
Fix https://github.com/PowerShell/PowerShell/issues/1654
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
PoshChan has been updated to use a new settings format so that authorized users are per action vs being global.
## PR Context
Since reminders don't incur much of a resource hit for PoshChan, there's no reason not to allow everyone to use it. See https://github.com/SteveL-MSFT/PoshChan-Bot for use instructions.
This PR optimizes the download tasks to reduce build times. After the change we see a order of magnitude reduction in download times for Windows package signing and also the compliance tasks.
In addition to that the PR also makes changes to organize the build artifacts in folders.
By not doing excessive amounts of extra work, formatting can be sped up quite significantly (about 8x faster).
The main change comes from adding new, more efficient, primitive to query an object for the existence of an instance member.
The formatting system has been checking for if an object has properties other than some decorated properties added by PS remoting, and it doesn't this by retrieving all properties which results in heavy allocations and wasted cycles.
By adding `GetFirstOrDefault` to `PSObject` and similar primitives to the underlying Adapters, we are able to return early, without having to get all properties back.
Improve type inference for foreach statement variables by:
Inferring strongly typed arrays from explicit array and array literal expressions when elements are of the same inferred type
Fix detection of foreach variable declaration. The previous logic was to check if the variable expression's start offset was after the end offset of the foreach statement, which will never be true in the body
Improve inference of what type the "Condition" of a foreach statement will enumerate as