Commit graph

5422 commits

Author SHA1 Message Date
Aditya Patwardhan d0806811e4 Update docs and scripts for beta.9 (#5217) 2017-10-24 16:28:22 -07:00
Dongbo Wang 1702358e75 Update installation doc and README.md to include the powershell binary archive packages (#5212)
* Update README.md

* Update docs for powershell binary archive packages

* Update the chart
2017-10-24 11:13:17 -07:00
Jonas Andersen ca30054761 Added BinPath, Description, UserName and Delayed Auto Start to Get-Service (#4907)
Added the following to the  Get-Service  command:
•BinaryPathName (Was suggested as  ServicePath )
•Description
•UserName (Was suggested as  LogOnAs )
•DelayedAutoStart
•ServiceStartupType

The ServiceStartupType was also added, providing the user access to use services like in  services.msc , having  Automatic ,  Automatic (Delayed Start) ,  Manual  and  Disabled  as options (Also includes  InvalidValue  as an initial value for  ServiceStartupType )
2017-10-24 10:54:07 +04:00
Dongbo Wang e4d88aaa9d Fix appimage package name to be lower case 'powershell-..' (#5206) 2017-10-23 21:40:39 -07:00
James Truher [MSFT] be700729d6 Unify cmdlets with parameter 'Encoding' to be of type System.Text.Encoding (#5080)
This unifies file encoding across the inbox cmdlets to be UTF-8 without a BOM for all platforms. This is a breaking change as cmdlets on windows have a number of different encodings. This supports better interoperability with tradition Linux shells as we are using the same encoding.

Validate that files are created with UTF-8 encoding without BOM
Update tests to validate Encoding parameter to new type and create new tests for
parameter type validation.

[Breaking Change] The '-Encoding Byte' has been removed from the filesystem provider cmdlets. A new parameter '-AsByteStream' is now added to indicate that a byte stream is required as input, or output will be a stream of bytes.
2017-10-23 19:46:27 -07:00
Steve Lee d85b9a472c Put command discovery before scripts for Unix (#5116)
* put command discovery before scripts for Unix

* remove unnecessary test
2017-10-23 17:54:28 -07:00
Travis Plunk 8051977ef5 Log sending daily web hook. (#5203)
Make sure we count xunit tests failures as a CI failure.
2017-10-23 13:58:03 -07:00
Dongbo Wang 1f75e81e4c Update docker files and related due to the name change (#5156) 2017-10-23 12:33:07 -07:00
Travis Plunk 14af252878 Update packaging to only package PowerShell binaries when packaging symbols (#5145)
* Update packaging script to only package PowerShell binaries when creating symbols zip.  disallow all other package types for symbols

* remove instrumentation used for debugging during development

* Add error action silently continue to cleanup for reliability.

* Add comment about why folder is being deleted.
2017-10-23 12:30:25 -07:00
Joshua King c98fe394ec Make Get-ChildItem honor Depth parameter with Include/Exclude (#4985)
* Add depth to ProcessPathItems

* Honors capped recursion when using Include or Exclude filters with Get-ChildItem

* Including test cases to test include/exclude recursion

* Swap optional parameter for overload
2017-10-23 12:22:05 -07:00
Keith Hill 6acbf5c5e4 Add global.json to pick correct SDK version (#5118) 2017-10-23 11:22:12 -07:00
Andrew e0af4d96d8 Add example of how to create a .net core cmdlet with Visual Studio (#5096) 2017-10-23 09:35:28 -07:00
Steve Lee 17c16ce4c5 Fix vscode launch.json to point to pwsh (#5189) 2017-10-23 09:29:48 -07:00
Aditya Patwardhan df06200be5 Add new Fwlinks for v6 help content (#4978)
Updated fwlinks to pull new help content for PSv6.
Fwlink for Microsoft.PowerShell.Core module is not updated since about_*help.txt is not available yet.
2017-10-23 09:28:17 -07:00
Dongbo Wang 5b2bbcbf89 Update the help text with the new name 'pwsh' (#5182) 2017-10-21 13:50:00 +04:00
Mark Kraus 9fd600448c Make -NoTypeInformation Default on Export-Csv and ConvertTo-Csv (#5164)
•Sets  -NoTypeInformation  as the default behavior for  Export-Csv  and  ConvertTo-Csv 
•Hides the  -NoTypeInformation  parameter switch
•Adds  -IncludeTypeInformation  switch to  Export-Csv  and  ConvertTo-Csv  to enable legacy behavior
•Provides a terminating error when both  -NoTypeInformation  and  -IncludeTypeInformation  are supplied
•adds tests for the new behavior
•fixes existing tests to align with new behavior

The new behavior will need to be documented.
2017-10-21 13:41:46 +04:00
Travis Plunk 13eb283560 Add code to send WebHook for Travis-CI Daily Build (#5183) 2017-10-20 15:06:37 -07:00
Dan Travison 053d180817 Add exports for syslog APIs in 'libpsl-native'. (#5149) 2017-10-20 09:03:59 -07:00
Dave Wyatt 1c469aaa22 Unwrap 'ValueFromRemainingArguments' if the single element is a collection (#5109)
Unwrapping of 'ValueFromRemainingArguments' was being performed only for 'object[]' arrays (which covers the most common PowerShell binding scenarios) but could be skipped if a collection of any other type were passed to the parameter. This change unwraps 'ValueFromRemainingArguments' if the single element is a collection.
2017-10-19 16:44:26 -07:00
Greg Zimmerman 5913069e58 Update powershell to pwsh. (#5174) 2017-10-19 15:09:57 -07:00
Dongbo Wang 2fd484f491 Update the man help file used in packaging (#5173)
* Update pacakging.psm1 and rename man file

* Update pwsh.1.ronn
2017-10-19 15:09:16 -07:00
Steve Lee e908b8a607 Enable import-module to be case insensitive (#5097)
Fix #1621 

Enable import-module to be case insensitive as macOS is case insensitive.
2017-10-19 14:44:21 -07:00
Dongbo Wang 59b5d16139 Update appimage.sh to reflect the new name 'pwsh' (#5172) 2017-10-19 12:32:55 -07:00
Keith Hill ca2630a3de Add document about how to create cmdlet w/dotnet CLI (#5117) 2017-10-19 11:32:40 -07:00
Steve Lee 847846d834 [feature] (#4960)
remove -computer support since corefx Process.GetProcesses(computer) returns local processes
2017-10-18 15:49:45 -07:00
Mark Kraus b4e8e9d06b Replace HttpBin.org/response-headers Tests with WebListener (#5058) 2017-10-18 12:24:02 -07:00
Greg Zimmerman 01fe7c24eb Add macos launcher. (#5138) 2017-10-18 12:22:07 -07:00
Dongbo Wang 2ceec725f6 Fetch resource string correctly (#5114) 2017-10-18 11:36:25 -07:00
Travis Plunk db6aec0850 Add compiler switches replace dangerous function with safer ones. (#5089)
* Add compiler switches replace the dangerous function with safer ones.
* Add -02 and make linker flags per platform
* add -O2 for arm and add -z,now
* remove windows linker flags
2017-10-18 10:08:11 -07:00
Chunqing Chen dd5fba3313 Exclude PSHostProcess cmdlets from Unix platforms (#5105)
- Exclude 'Get-PSHostProcessInfo', 'Enter-PSHostProcess' and 'Exit-PSHostProcess' from Unix platforms.
- Update tests and add additional cmdlets need to be excluded
2017-10-18 09:26:24 -07:00
Steve Lee 6177d28410 removed RunspaceConfiguration support (#4942)
For PSCore 6, we are only supporting InitialSessionState. The RunspaceConfiguration APIs were already made internal. This PR removes all the code related to RunspaceConfiguration. This also means that some public APIs have changed. Was deciding between leaving the RunspaceConfiguration parameters and throwing Unsupported, but thought it was better to have it a compile-time error. This should simplify the code base.
2017-10-18 09:12:23 -07:00
Dominic 81c46c6e51 Fix MatchInfoContext clone implementation (#5121)
The old implementation always set the new object's properties to null.
2017-10-17 20:53:29 -07:00
Mark Kraus 7c9bddfa3d Add Authentication Parameter to Web Cmdlets for Basic and OAuth (#5052)
Closes #4274

Adds an -Authentication parameter to Invoke-RestMethod and Invoke-WebRequest
Adds an -Token parameter to Invoke-RestMethod and Invoke-WebRequest
Adds an -AllowUnencryptedAuthentication parameter to Invoke-RestMethod and Invoke-WebRequest
Adds tests for various -Authorization uses
-Authentication Parameter has 3 options: Basic, OAuth, and Bearer
Basic requires -Credential and provides RFC-7617 Basic Authorization credentials to the remote server
OAuth and Bearer require the -Token which is a SecureString containing the bearer token to send to the remote server
If any authentication is provided for any transport scheme other than HTTPS, the request will result in an error. A user may use the -AllowUnencryptedAuthentication switch to bypass this behavior and send their secrets unencrypted at their own risk.
-Authentication does not work with -UseDefaultCredentials and will result in an error.
The existing behavior with -Credential is left untouched. When not supplying -Authentication, A user will not receive an error when using -Credential over unencrypted connections.

Code design choice is meant to accommodate more Authentication types in the future.

Documentation Needed

The 3 new parameters will need to be added to the Invoke-RestMethod and Invoke-WebRequest documentation along with examples. Syntax will need to be updated.
2017-10-17 19:08:06 -07:00
Steve Lee 2cc091115b Rename powershell.exe to pwsh.exe (#5101)
- Rename powershell.exe to pwsh.exe
- Fixe appveyor.psm1
- Update MSI to include 'pwsh' in path and app paths
- Revert change for hyper-v powershell direct
- Update names in packaging.psm1.
- Fix check for SxS
2017-10-17 17:25:11 -07:00
Mark Kraus 17731cf6e9 Add Get-WebListenerUrl Based Examples to WebListener README.md (#4981)
- Add Get-WebListenerUrl Based Examples to WebListener README.md
- Fix Cert test example
2017-10-17 16:18:54 -07:00
James Truher [MSFT] d5445ff691 Make sure that there's a statement separator after we update the path, otherwise the built script will not run (#5137) 2017-10-17 13:32:21 -07:00
Ilya f604b0e3f0 Merge pull request #4995 from SteveL-MSFT/remove-apartmentstate
* wrapped STA code sections in `#if STAMODE` for potential future use
removed -importsystemmodules switch from powershell.exe and related code
removed -consolefile parameter from powershell.exe and related code

* removed font and codepage handling code that is only applicable to Windows PowerShell
replaced LengthInBufferCells() method with Unicode adapted code from PSReadline

* removed `#if CORECLR` statements merging code base

* [feature]
removed code to show a GUI prompt for credentials as PSCore6 prompts in console

* Remove unncessary method 'LengthInBufferCellsFE'
2017-10-17 09:31:49 +04:00
Steve Lee 173380b9c7 Remove unncessary method 2017-10-16 16:55:50 -07:00
Steve Lee 88313705bd Change location of ModuleAnalysisCache so it isn't shared with Windows PowerShell (#5133)
Currently, it's using the same location as Windows PowerShell and the two should not be sharing one as the PSModulePaths are different between the two.
2017-10-16 14:31:29 -07:00
Mark Kraus cfbd8986fd Add Uservoice Link to Issue Template (#5100) 2017-10-16 13:20:18 -07:00
Travis Kinney 52f9125aba StopJobCommand: Remove Unreachable Code (#5091)
This code will never get executed, and its logic is
duplicated in the HandleStopJobCompleted() method.
2017-10-16 10:06:32 -07:00
Aditya Patwardhan 486fb97123 Test fixes and code coverage automation fixes. (#5046)
* Test fixes and updates to code coverage automation
* Fixed UpdatableHelpSystem tests and tab completion tests
* Fixed tab completion tests to better disambiguate root/interop namespace.
* Skip SSH test if ssh.exe is not present
2017-10-13 13:54:43 -07:00
Dongbo Wang 37b5a47fa9 Update existing docker files (#5102) 2017-10-13 11:54:52 -07:00
Dongbo Wang f2eaeb8b8e Remove '-ComputerName' from 'Get/Set/Remove-Service' (#5094) 2017-10-13 22:06:46 +04:00
Dongbo Wang 7df3a3f3fb Minor update to building/internals.md (#5095) 2017-10-13 10:03:14 -07:00
Kyle Sferrazza a2dc405242 Update instructions for building from source (#5072)
- Use new S.M.A.dll for build instructions
- Include custom build target in `internals.md` - build.sh no longer exists
2017-10-13 09:57:07 -07:00
Chunqing Chen 07d3b1806c Get-Content -Raw should not neglects to read the last character, if it is a LF (#5076) 2017-10-13 11:05:51 +04:00
Travis Plunk dc1a1cee33 Add release builds that produce symbols for compliance scans (#5086) 2017-10-12 14:48:53 -07:00
Tadas Medišauskas 844bf11dde Get-Verb: add verb descriptions and alias prefixes (#4746)
* Get-Verb: add descriptions and prefixes

* Add description and alias prefix tests

* Make the new classes internal

* Convert alias prefix to static method

* Move verb descriptions to a resource file

* Shorten function name

* Shorten alias prefix function name

* Change tests to look at counts

* Add uniqueness test

* Add missing alias prefixes

* Fix name collision

* Change alias prefix for Compare

* Rename method

* Remove unnecessary string allocation

* Make tests easier to diagnose
2017-10-12 14:40:06 -07:00
Dongbo Wang a391998a25 Support creating tarball package for Linux and macOS (#5085)
* Support creating tarball package for Linux and macOS

* Address comments
2017-10-12 13:36:46 -07:00