Commit graph

6341 commits

Author SHA1 Message Date
Steve Lee
0a2f9c8821 Update Enable-PSRemoting so configuration name for Preview releases (#7202)
The intent was to have the version of the PSSessionConfiguration name not include the `v` for the version string.  Also, Preview releases should standardize on `PowerShell.6-Preview` instead of clobbering `PowerShell.6` so that stable and preview can co-exist side-by-side.

Need to verify on Win10 IoT if `Install-PowerShellRemoting.ps1` is still needed anymore as it may be possible to run `pwsh -c enable-psremoting` from within Windows PowerShell Core removing the need for that script which duplicates `Enable-PSRemoting` capability.

Update: Not able to get the current master build working on Win10 IoT, getting `Invalid access to memory` error.  Will have to investigate this separately from this PR and keep `Install-PowerShellRemoting.ps1` for now.

Fix https://github.com/PowerShell/PowerShell/issues/7119
2018-07-16 19:35:48 -07:00
Robert Holt
c94fc31f97 Enforce the 'CompatiblePSEditions' check for modules from the legacy 'System32' module path (#7183)
- Add `%WINDIR%\System32\WindowsPowerShell\v1.0\Modules` (Windows PowerShell $PSHOME) to the end of the default PSCore 6 module path (i.e. the module path as initially set at startup).
- Cause an error to be thrown by `Import-Module` when a module with `CompatiblePSEditions` not containing `"Core"` is being loaded from the 'System32' module path.
- Suppress output of modules listed by `Get-Module -ListAvailable` from Windows PowerShell $PSHOME when `CompatiblePSEditions` does not contain `"Core"`.
- Introduce the `-SkipCompatibilityCheck` switch parameter on both `Import-Module` and `Get-Module` to respectively allow importing incompatible modules and listing incompatible modules.
- Adds a  `PSEdition` column to the `PSModuleInfo` table view format.
- Ensures that completions are not given for incompatible modules on the System32 module path.
2018-07-16 16:58:40 -07:00
Steve Lee
da7b5216b5 Update remote prompt when using ssh to show username if different (#7191)
Currently, the remote prompt only shows the remote computer name:

> [computer] PS:\foo>

With this change, if you use PSRP over SSH and you specified a different username, it shows whom you logged in as:

> [user@computer] PS:\foo>

The fix is when the remote prompt is being created to check if using SSH if so, check if the current user is different than the specified user and specified.  If different, use `[user@computer]`, otherwise fallback to default `[computer]` prompt.

Fix https://github.com/PowerShell/PowerShell/issues/7156
2018-07-16 11:45:32 -07:00
Dongbo Wang
ee0a643f19
Fix the encoding of 'PowerShell.sln' to be utf-8 (#7289) 2018-07-13 20:43:26 -07:00
Aditya Patwardhan
7ba4d65a42 Fix the file 'PowerShell.sln' that was corrupted by accident (#7288) 2018-07-13 18:11:55 -07:00
Dongbo Wang
6f3e9d0881
Added Markdown rendering cmdlets (#6926)
- `ConvertFrom-Markdown` is used for converting a markdown document or string to a MarkdownInfo object. It can optionally return an HTML or a VT100 encoded string in addition to an AST of the markdown document.
- `Show-Markdown` is used to either display the VT100 encoded string on the console or redirect the HTML string to the browser.
- `Set/Get-MarkdownOption` cmdlets are used to view or set markdown rendering options.
2018-07-13 13:56:17 -07:00
Aditya Patwardhan
ab07b85f01
Merge pull request #7284 from daxian-dbw/removeVB
Remove the 'VisualBasic' support from Add-Type
2018-07-13 13:48:50 -07:00
Aditya Patwardhan
a1627a396d [Feature] Changed AsEscapeSequence to accept an enum and update Markdig version to latest 2018-07-13 12:50:43 -07:00
Aditya Patwardhan
ce5f9f9af7 [Feature] Fix comments and other code review comments 2018-07-13 11:18:14 -07:00
Bruce Payette
f4a50eda0d Fix prompt string to be platform agnostic and keep its trailing spaces (#7255) 2018-07-13 01:22:10 -07:00
Bruce Payette
716ed2acbd Fix a parsing error when 'break' and 'continue' are used in a switch statement in a finally block (#7273) 2018-07-13 01:19:47 -07:00
Dongbo Wang
c34866d0fa [Feature] Remove 'VisualBasic' support from Add-Type 2018-07-12 23:50:09 -07:00
Travis Plunk
b15709f444 update to latest package references, runtime framework, and SDK (#7272)
* update to latest package references

* update runtime framework

* update sdk

* automatically read NuGet package dependency info from csproj, where version info is fully qualified

* update file.wxs
2018-07-13 09:00:35 +05:00
Aditya Patwardhan
b5601cfb66 [Feature] Added wix component updates 2018-07-12 17:17:52 -07:00
Aditya Patwardhan
67b29151f6 Style fixes 2018-07-12 17:17:51 -07:00
Aditya Patwardhan
e711c5dcc3 [Feature] Address code review comments 2018-07-12 17:17:50 -07:00
Aditya Patwardhan
731afbf14d [Feature] Add markdown cmdlets to default commands list 2018-07-12 17:17:50 -07:00
Aditya Patwardhan
a78d006ac1 Added missing error messages 2018-07-12 17:17:50 -07:00
Aditya Patwardhan
7bf1604f97 Codefactor style fixes 2018-07-12 17:17:49 -07:00
Aditya Patwardhan
481d3b1ebf [Feature] Add more tests 2018-07-12 17:13:55 -07:00
Aditya Patwardhan
275e109202 [Feature] Address code review comments 2018-07-12 17:13:55 -07:00
Aditya Patwardhan
32876c89e7 Added Tests for Markdown cmdlets 2018-07-12 17:13:55 -07:00
Aditya Patwardhan
1cf14bd596 Added Markdown rendering cmdlets
ConvertFrom-Markdown is used for converting a markdown document or string to a MarkdownInfo object.
It can optionally return a HTML or VT100 encoded string in addition to a AST of the markdown document.

Show-Markdown is used to either display the VT100 encoded string on console or redirect the HTML string to the browser.

Set/Get-MarkdownOption cmdlets get be used to view or set markdown rendering options.
2018-07-12 17:13:55 -07:00
Aditya Patwardhan
75ba74cce6
Merge pull request #7242 from daxian-dbw/exp
Add support to experimental features

RFC: https://github.com/PowerShell/PowerShell-RFC/pull/114

Goals:

Allow experimental features to be declared by PowerShell engine and modules.
Allow experimental features to be enabled via powershell.config.json
Allow Function, Cmdlet, parameters and parameter sets to be shown to the user or hiden from the user depending on whether the associated experimetnal feature is on or off.
Allow discover experimental features using cmdlet Get-ExperimentalFeature
2018-07-12 15:52:04 -07:00
James Truher [MSFT]
d61ea03694 Make pwsh able to start in a directory with wildcards in the name (#7240) 2018-07-12 15:10:31 -07:00
Aditya Patwardhan
5702e3f57a Added markdown rendering feature assemblies to the trusted assembly list (#7280) 2018-07-12 14:19:19 -07:00
Robert Holt
6a66a6e0f0 Add more information to job process failure error (#7251) 2018-07-12 08:06:07 +05:00
Dongbo Wang
d12230f188 [Feature] Address Feedback: Use value tuple (int, string) as the sorting key 2018-07-11 17:53:24 -07:00
Travis Plunk
79d20a1873
Update PowerShell Direct to try pwsh then fallback to powershell (#7241)
Update PowerShell Direct to try pwsh then fallback to powershell

  - Forward port changes from Windows Powershell to fall back
  - change the order from powershell->pwsh to pwsh->powershell

fixes #7237
2018-07-11 15:44:31 -07:00
Aditya Patwardhan
749d1609bb
Update README files for native code for migration (#7248) 2018-07-11 14:32:01 -07:00
Steve Lee
e5e1c53084 Add test to verify filesystem provider isn't used when accessing root path in psdrive (#7173)
* add test to verify filesystem isn't used when not in filesystem drive
2018-07-11 14:10:29 -07:00
Paul Higinbotham
040c494f94 Fixes to address ThreadJob tests reliability and speed (#7270)
This change merges Jim's fixes with some more I identified that will make the tests more reliable and faster to run.

The changes add functions to wait for the desired state instead of simply waiting a specified period of time, and also speeds up running job script execution time.
2018-07-11 13:00:08 -07:00
Dongbo Wang
add14e452f [Feature] Address Feedback: Do not override user defined cache path 2018-07-10 22:53:39 -07:00
Dongbo Wang
0ac878f72c [Feature] Address Feedback: Fix style and xml doc issues. Update tests 2018-07-10 12:46:48 -07:00
Dongbo Wang
2c9519ba3b [Feature] Address Feedback: Use better error message and add more tests 2018-07-10 02:14:59 -07:00
Dongbo Wang
c7c35bdcf3 [Feature] Address Feedback: make value tuple element types explicit 2018-07-09 17:51:19 -07:00
Dongbo Wang
b616cf578a [Feature] Address Feedback: style changes and fixing typo 2018-07-09 17:17:12 -07:00
Dongbo Wang
10334220e8 Address Feedback: functional changes and method/variable renaming 2018-07-09 17:14:34 -07:00
Dongbo Wang
2fce1bfe56 [Feature] Root caused test failure issue and fix it 2018-07-09 10:51:57 -07:00
Christoph Bergmeister [MVP]
ef10460172 Make 'Start-PsBuild -Clean' not prompt due to locked files when Visual Studio is open by excluding sqlite3 folder and use -x instead of -X option on git clean (#7235)
* Exclude sqllite  folder when cleaning and use -x instead of -X option

* Remove 2nd git clean block which is redundant now
2018-07-09 10:16:56 -07:00
PRASOON KARUNAN V
9dcfddde9e Adding -AllStats Switch parameter for Measure-Object cmdlet (#7220) 2018-07-09 08:45:32 +05:00
Dongbo Wang
bc8abf8efa [Feature] Fix two tests 2018-07-06 13:28:20 -07:00
Dongbo Wang
d2e9151fff [Feature] Add tests for experimental feature work 2018-07-06 13:28:20 -07:00
Dongbo Wang
3c3ddeb127 Alter the analysis cache file name properly 2018-07-06 13:28:20 -07:00
Dongbo Wang
d8d3344e98 Generate logging resources for Unix platforms 2018-07-06 13:28:20 -07:00
Dongbo Wang
dc2d741791 Add logging, formatting, and '$EnabledExperimentalFeatures' 2018-07-06 13:28:19 -07:00
Dongbo Wang
7770aa547e Add 'Get-ExperimentalFeature' cmdlet 2018-07-06 13:28:19 -07:00
Dongbo Wang
8a5ddbb231 Support experimental feature in modules 2018-07-06 13:28:19 -07:00
Dongbo Wang
930350e2ee Update code that creates attributes to support the new attribute changes 2018-07-06 13:28:19 -07:00
Dongbo Wang
eed9842534 First batch: Basic experimental feature flag and attributes enforced 2018-07-06 13:28:18 -07:00