Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -SkipHeaderValidation Support to ContentType on Web Cmdlets #6018

Merged
merged 5 commits into from
Feb 22, 2018

Conversation

markekraus
Copy link
Contributor

@markekraus markekraus commented Jan 25, 2018

PR Summary

Documentation will need to be updated to reflect that -SkipHeaderValidation works with -ContentType

PR Checklist

Note: Please mark anything not applicable to this PR NA.

@markekraus markekraus added the Documentation Needed in this repo Documentation is needed in this repo label Jan 25, 2018
{
ErrorRecord er = new ErrorRecord(ex, "WebCmdletContentTypeException", ErrorCategory.InvalidArgument, ContentType);
ThrowTerminatingError(er);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be helpful to write a warning when the exceptions are suppressed due to SkipHeaderValidation; otherwise, there will be no indication that the header was not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me.. supplying -SkipHeaderValidation means "suppress all header related messages". Perhaps verbose would be better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I see it otherwise; I don't want validation to occur but if it can't be added at all, I believe I would need to know. For example, I'm aware of cases where header values are needed that do not conform to the standard but the target site requires it; however, if the header cannot even be added, it's something I will need to address because the request is no longer conveying what I expect.

Copy link
Contributor Author

@markekraus markekraus Jan 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm i think I'm a bit confused. We are not discarding any header values.The section of code where this comment thread lives is not the section where headers are added to the request. this section of code is where it tryes to determine request body encoding from -ContentType. We try/catch here because the value foo throws FormatException on new MediaTypeHeaderValue("foo").

The section where headers are added, the headers will always be added (here)

The only case in which request.Headers.TryAddWithoutValidation() or request.Content.Headers.TryAddWithoutValidation() would not add headers would be if the headers already existed. This is not possible because we are enumerating a dictionary so the keys will be case-insensitve unique. The headers will always be added and in fact the tests in the project prove that.

$response.Error.Exception.Message | Should Be "The format of value '12345' is invalid."
}
$response.Error | Should Not BeNullOrEmpty
$response.Error.FullyQualifiedErrorId | Should Be "System.FormatException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any tests for the ArgumentException path of the MediaTypeHeaderValue try/catch block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dantraMSFT This is still WIP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually... we do hit the MediaTypeHeaderValue try block already in the tests "Verifies Invoke-WebRequest default ContentType handling reports an error is returned for an invalid Content-Type header value and -Body" and "Verifies Invoke-RestMethod default ContentType handling reports an error is returned for an invalid Content-Type header value and -Body".

We actually can't reach the CharSet section (for now) because... new MediaTypeHeaderValue("application/json; charset=utf-8"); will throw FormatException.... dotnet/corefx#16290

Effectively... This is all dead code already:

if (!string.IsNullOrEmpty(mediaTypeHeaderValue.CharSet))
{
try
{
encoding = Encoding.GetEncoding(mediaTypeHeaderValue.CharSet);
}
catch (ArgumentException ex)
{
ErrorRecord er = new ErrorRecord(ex, "WebCmdletEncodingException", ErrorCategory.InvalidArgument, ContentType);
ThrowTerminatingError(er);
}
}

That would explain why I can't find any tests for -ContentType 'text/plain; charset=utf-8' or similar.. it wouldn't even be possible. It already throws a FormatException

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closed

@markekraus markekraus changed the title WIP: Add -SkipHeaderValidation Support to ContentType on Web Cmdlets Add -SkipHeaderValidation Support to ContentType on Web Cmdlets Jan 26, 2018
@markekraus
Copy link
Contributor Author

@dantraMSFT This is ready for review now.

@markekraus
Copy link
Contributor Author

@dantraMSFT Ping

$uri = Get-WebListenerUrl -Test 'Get'
$headers = @{"If-Match" = "*"}
$response = ExecuteRequestWithCustomHeaders -Uri $uri -headers $headers
It "Verifies Invoke-WebRequest default header handling with no errors" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure whether these are tabs which have snuck in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$uri = Get-WebListenerUrl -Test 'Post'

{ Invoke-WebRequest -Uri $uri -Method 'Post' -ContentType $contentType -Body $body -ErrorAction 'Stop' } |
ShouldBeErrorId "WebCmdletContentTypeException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the new Pester should -throw -errorid <...>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could. I made this PR before the project changed to Pester 4. However, The guidance does still say to use ShouldBeErrorId https://github.com/PowerShell/PowerShell/blob/master/docs/testing-guidelines/WritingPesterTests.md

@adityapatwardhan adityapatwardhan merged commit 11d2e2d into PowerShell:master Feb 22, 2018
@adityapatwardhan
Copy link
Member

@markekraus Thank you for your contribution!

markekraus added a commit to markekraus/PowerShell-Docs that referenced this pull request Mar 30, 2018
sdwheeler pushed a commit to MicrosoftDocs/PowerShell-Docs that referenced this pull request Mar 31, 2018
Lolle2000la added a commit to Lolle2000la/PowerShell that referenced this pull request Apr 24, 2018
* Revert "Pull PSReadLine from PSGallery" (PowerShell#5986)

This reverts commit beffdcf.

* update 6.0.1 change log (PowerShell#5937)

* Remove Fedora 25, Add Fedora 27 (PowerShell#5984)

Fedora 25 was EOL on December 12, 2017

https://fedoramagazine.org/fedora-25-end-life/

Signed-off-by: Eli Uriegas eli.uriegas@docker.com

* tests: fix function to test for docker OS due to change to use linuxkit for mac (PowerShell#5843)

* Also, fix syntax issues to allow to work with released Pester

* Start using Travis-CI cache (PowerShell#6003)

* Fix a NullReference exception in Enter-PSHostProcess (PowerShell#5995)

* Return better error for 'pwsh -WindowStyle' on unsupported platforms. (PowerShell#5975)

* Change Microsoft.PowerShell.Commands.SetDateCommand.SystemTime to struct. (PowerShell#6006)

Change Microsoft.PowerShell.Commands.SetDateCommand.SystemTime class to struct and resolve the error in Set-Date cmdlet - SetLocalTime function is causing a parameter error (error code 0x00000057).

* Add Simplified multipart/form-data Support to Web Cmdlets Through -Form Parameter (PowerShell#5972)

- Adds -Form Parameter to Invoke-WebRequest and Invoke-RestMethod.
- Form Accepts any IDictionary.
- Keys are used as multipart/form-data field names (PSObject unwrapped and ConvertTo<String>(Object)).
- FileInfo values are added as StreamContent with application/octet-stream content type and the FileInfo.Name as the file name.
- Strings are treated as StringContent.
- Singe values are converted to string with ConvertTo<String>(Object) and treated as StringContent
- Top level collections are enumerated and converted as above. Nested collections are treated as a single value and converted accordingly.
- Form is mutually exclusive with -Body and -InFile.
- Per PowerShell-Committee decision, -Form makes no assumptions about the HTTP method used. It can theoretically be used with any method. User will need to manually supply -Method POST to post the form.
- ContentType and content related headers supplied to -Headers will be ignored/cleared as MultipartFormDataContent requires control of these headers.

* Add '-settingsfile' to 'pwsh' to support loading a custom powershell config file. (PowerShell#5920)

Support loading a custom `powershell.config.json` file via the command-line for use in testing.
This change supports replacing the default `powershell.config.json` file that's usually loaded from the `PSHome` directory with a custom version file.

The primary use-cases for this command-line option are as follows:
1. Allow the CI system to disable settings that impact test run times; such as disabling syslog usage on Linux and MacOS
2. Support testing of syslog and os_log without interfering with normal PowerShell operations during test runs via launching an instance with custom log settings.

* Fix .gitignore (PowerShell#5991)

Use single '*' in file name /src/TypeCatalogGen/powershell*.inc

* update date on change log (PowerShell#6023)

* Skip tests that use ExecutionPolicy cmdlets on Unix (PowerShell#6021)

* CI Build: Use TRAVIS_PULL_REQUEST_SHA to accurately get the commit message (PowerShell#6024)

* Rework Windows Start menu folder name (PowerShell#5891)

Changes the Windows start menu folder name from ProductSemanticVersionWithName to ProductSemanticVersionWithNameAndOptionalArchitecture - now the start menu is `PowerShell` for all versions.

* update processes to allow for coordinated vulnerability disclosure (PowerShell#6042)

* Resort parameter list in alphabetical order (PowerShell#6052)

After PowerShell#5920 we should reorder parameter list (PowerShell#4989)

* new `Issue-Announcement` label (PowerShell#6041)

* Adds script to patch the shortcut working directory to the user's home folder. (PowerShell#6043)

Update the shortcut created by the installer to use %HOMEDRIVE%%HOMEPATH% for the working directory.

* Fix "Pull Request Process" dead link (PowerShell#6066)

Fix "Pull Request Process" anchor links in governance.md

* Add Environment Variable override of telemetry (PowerShell#6063)

Inspired by dotnet cli, and allows for Telemetry opt-out on packaging systems such as AppImage and Snapcraft where the filesystem is immutable.

* add comments about where most of the packages are from (PowerShell#6016)

* Test: Add Verbosity and more accurate timeout implementation for Start-WebListener (PowerShell#6013)

- Add verbosity to the WebListener when it fails to assist in troubleshooting
- Switch the WebListener initialization timeout to count cycles instead of using fixed dates to work around possible VM CI sleep/ issues.

* Build: Update PowerShell to build with .NET Core SDK 2.1.4 (PowerShell#6054)

* Change Web Cmdlet Tests to Use 127.0.0.1 not Localhost (PowerShell#6069)

Change Web Cmdlets Tests to Use 127.0.0.1 instead of localhost due to dotnet/corefx#24104
This provides a decent speed boost to the WebCmdlet tests (Faster in dozens of times).

* Remove unsupported members from the enum 'Language' in Add-Type (PowerShell#5829)

[breaking change]
Remove the unsupported members (various versions of CSharp and `JScript`) from the enum 'Language' in Add-Type. After this change, `Add-Type -Language` only supports `CSharp` and `VisualBasic`.

* Doc: Fix the command to build type catalog in internals.md (PowerShell#6084)

* Fix the filtering of analytic events on Unix platforms. (PowerShell#6086)

- Remove previous `UseAlwaysAnalytic` workaround in `SysLogProvider.Log`
- Update Script Block logging to always log to the operational channel with `UseAlwaysOperational`
- Fix `PSChannel` on Linux to use a bitmask
- Handle `UseAlwaysOperational` and `UseAlwaysAnalytic` keywords but adding to `_keywordFilter` if the associated channels were selected in the configuration

* [Feature] Remove -TimeOutSec from non timeout related tests (PowerShell#6055)

The timeout mechanism should be supported by the test framework (Pester here).

* change logo to SVG (PowerShell#6072)

Current README uses a PNG which doesn't scale for high dpi displays (starts to look fuzzy).
Created 64 pixel wide version of svg of the black logo and inserted into README.md.
Note that it currently doesn't render as the absolute URL points to master so that it gets
rendered correctly in other places where the README.md is used (like docker hub).

* Enable setting PSSession Name when using SSHTransport and added Transport property (PowerShell#5954)

When using New-PSSession -SSHTransport -Name ... the Name parameter wasn't being used when creating the remoterunspace so an automatically generated one was always created.
Fix is to explicitly pass the transport name when generating a runspace name including other transports like VMBus and Container.

Refactor runspace name generation code to produce "RunspaceN" and added a Transport property.

Tests will have to wait until we have the infrastructure for remoting tests and Enable-SSHRemoting work is complete.

Fix PowerShell#5951
Fix PowerShell#2426

* Add registry value for easy detection (PowerShell#6094)

Add registry value for easy detection. For example, the presence of a single key of 6.0.* x64. This is much faster than MSI detection.

Note there are currently two GUIDs, one for 6.0.* x64 and one for 6.0.* x86.

fixes PowerShell#6090

* Update test framework and tests to support 4x version of Pester (PowerShell#6064)

* Test fixes and changes needed to support Pester 4.0.8

* Replace 'Should Contain' with new 'Should FileContentMatch' assertion

Explicitly check for string creation with write-output

* Use the current version of pester and install it in modulesDir

* Simplify logic for relative path test.

Multiple '..' is not needed for a relative path, a single one will do. Also, on multi-drive systems using split-path -noqualifier will probably do the wrong thing with regard to constructing a correct path.
Remove extraneous Should Not Throw test, if this throws, the test will fail, we don't need to explicitly assert the not throw

* In some environments it is possible that computer name is 'localhost', so that should be allowed

* [feature] Add link for migrating tests from Pester v3 to v4

Fix up capitalization and white space issues
Change one test to check FullyQualifiedErrorId rather than just `Should Throw`

* [feature] update invoke-item test to handle the case where multiple notepad processes are running

* Fix spelling issue with Pester 4x, calling it Pester 4 should be sufficient

* Use 'RequireAdminOnWindows' tag in Set-Date tests (PowerShell#6034)

* Use 'RequireAdminOnWindows' tag instead of 'Test-IsElevated' function.

* Fix incorrect condition of user privilege in Linux/macOS CI

* Update 'Restore-PSPester' to use 'Save-Module' (PowerShell#6112)

Update Restore-PSPester to use 'Save-Module' to get the latest version of Pester.
We have moved to the latest version of Pester via PR PowerShell#6064

* Msi installer: Add smoke test (PowerShell#6105)

PR 6043 broke the installer (issue PowerShell#6095). To prevent this from happening in the future, add a smoke test that installs the msi in appveyor build and make build fail if installation failed.
It uses the exit code to determine the success. The reason why it does not fail in the current state is because as I pointed out here, the failing custom action is not returning its exit code.

* add scripts to set/update the release tag in VSTS (PowerShell#6107)

* Improve table view for Certs and Signatures by adding EnhancedKeyUsageList and StatusMessage (PowerShell#6123)

* add EnhancedKeyUsageList to default table view of X509Certs
add StatusMessage to default table view of cert signatures

* set fixed width of 20 to Subject so more room for EnhancedKeyUsageList content
change EnhancedKeyUsageList to script to just show the friendly name

* Get-ChildItem <PATH>/* -file should include <Path> as search directory (PowerShell#5431)

* get-childitem <PATH>/* -file should include <Path> as search directory

* [Feature] Added check for -Directory and more tests

* [Feature] Added check for the dynamic parameter type

* Refactor the Get-Content tests to use -TestCases. (PowerShell#6082)

* Update examples to 6.0.1 and removed a removed parameter in Install-PowerShellRemoting.ps1 (PowerShell#6060)

The PowerShellVersion parameter no longer exists in Install-PowerShellRemoting.ps1.
Updated examples to 6.0.1 from alpha 9

* add guidance on adding copyright and license header to new source files (PowerShell#6140)

* Update Raspbian installation instructions to create pwsh symlink (PowerShell#6122)

* Update Raspbian installation instructions to create pwsh symlink

* [breaking-change] Fix range operator (PowerShell#5732)

Breaking-change:  "0".."9" returns [char] previously in PowerShell Core (6.0.0, 6.0.1), now it returns [int]. After the change, the behavior is the same as in Windows PowerShell.

* Update copyright and license headers (PowerShell#6134)

Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: PowerShell#6140

Manually reviewed each change.

Fix PowerShell#6073

* Invoke-Item.Tests.ps1 handles finding multiple ping executables. (PowerShell#6120)

Invoke-Item.Tests.ps1 handles finding multiple ping executables.

Fixes Issue PowerShell#5220

* Enable $env:PAGER to work correctly if arguments are used (PowerShell#6144)

Correctly parse $env:PAGER with args like 'less -w'.

* Support running tests in root privilege on Linux. (PowerShell#6145)

Support running tests in root privilege on Linux by adding the `REQUIRESUDOONUNIX` tag.
- Delete skip tag in tests which require `sudo`.

* fix spelling failures in CI (PowerShell#6191)

This fixes spelling failures in CI. It appears to be caused by a change in the tool used to test spelling
This change:

-Updates the dictionary for new and words which are detected differently
-updates markdown where it is more appropriate
-adds one file to the markdown tests.

* Add tests for Set-Item Cmdlet for Function Provider. (PowerShell#6166)

* change the registry version detection value to semver from the default value (PowerShell#6192)

change the registry version detection value to semanticversion from the default value
fixes PowerShell#6171

* Revert PR 6043 - Adds script to patch the shortcut working directory to the user's home folder (PowerShell#6203)

Revert PR 6043 - Remove failing script from MSI

reverted from commit 795c611

* [feature] Make UTF-8 Default Encoding for application/json (PowerShell#6109)

When a charset is not supplied for a JSON response, the default encoding should be UTF-8 per RFC 8259. This commit changes the default charset to UTF-8 for JSON responses when a charset is not defined.

* Add options to enable PSRemoting and register Windows Event Logging Manifest to MSI installer (PowerShell#5999)

* Docker package test fix and updates (PowerShell#6169)

* Add common aliases for all write-* commands default message parameter (PowerShell#5816)

* add common write aliases

* add Message alias to the MessageData parameter for Write-Information
add  Msg and Message alias to the Object perameter for Write-Host

* Add tests for new aliases

* Add -SkipHeaderValidation Support to ContentType on Web Cmdlets (PowerShell#6018)

* Add SkipHeaderValidation Support to ContentType on Web Cmdlets

* Move -SkipHeaderValidation Tests to Contexts

* Add ContentType -SkipHeaderValidation Tests

* Improve ContentType Exception

* Improve error message on invalid -ContentType

* Add tests for *-Item Cmdlets in Function Provider (PowerShell#6172)

* [breaking change] Throw terminating error in New-TemporaryFile and make it not rely on the presence of the 'TEMP' environment variable (PowerShell#6182)

- Fixes issue PowerShell#4634 by throwing a terminating error as agreed.
- Makes the command not rely on the presence of the TEMP environment variable to get path to temp directory and use the .Net method Path.GetTempPath() instead.
- Catch exception more specific as given by the documentation
- Improve existing test.

* Don't add trailing spaces to last column when using Format-Table (PowerShell#5568)

* don't add trailing space to last column in table

* fix out-file tests to new behavior of no padding trailing spaces

* Refactor new-msipackage into packaging.psm1 (PowerShell#6208)

Refactor new-msipackage and related function into packaging.psm1

* Docs: correct a linux installation typo (PowerShell#6219)

* Add Password parameter to Get-PfxCertificate cmdlet (PowerShell#6113)

Add Password parameter to Get-PfxCertificate cmdlet to allow automatization instead of prompting for password every time.

* fix various places that still refer to old versions of pwsh (PowerShell#6179)

* Fix a typo in the help content of `pwsh` in ManagedEntranceStrings.resx

* Make it clearer how and what to mark as "not applicable" in PR template (PowerShell#6209)

* use powershell windowsservercore docker image for release builds (PowerShell#6226)

* Set pipeline thread stack size to 10MB (PowerShell#6224)

* Uses TLS 1.2 on Windows during Start-PSBootstrap (PowerShell#6235)

* Fixed TLS version error on Windows when building PowerShell

* Use TLS 1.2 in Start-PSBootStrap Without Breaking HTTPS (PowerShell#6236)

* Add RequireSudoOnUnix tag for get-help <cmdletName> tests. (PowerShell#6223)

* Fix table alignment and padding. (PowerShell#6230)

- The original change to remove extra padding didn't take into account alignment.
  Fix logic to accommodate left, center, and right alignment in the table format and also add tests.
- Fix ImplicitRemoting test that validates formatting to use same instance due to formatting changes in this PR
- Only use loopback to same powershell instance for formatting test as the other tests implicitly expect Windows PowerShell.

* Fix date tests failing in travis CI full builds (PowerShell#6249)

* Add scripts to generate unified Nuget package (PowerShell#6167)

Remove the functions which generated Nuget packages for Windows.
Add function New-UnifiedNugetPackage to generate nuget packages for each assembly with unix and windows runtimes.
Add function New-NuSpec and New-ReferenceAssembly for creating the required items forNew-UnifiedNugetPackage.
Add a sample for cross platform project with conditional compilation for Linux.
Add function Publish-NugetToMyGet to publish nuget packages to powershell.myget.or

* fix MSI creation errors, and capture wixpdb for later patch creation (PowerShell#6221)

- add `wixpdb` output when creating `MSI` package
- capture `wixpdb` in official build
- clean up anything left behind from previous MSI builds before starting MSI build to prevent using dirty files.
- make sure MSI creation fails if there is an error
- ignore `.wixpdb` files in git
- Add functionality to `Start-NativeExecution` to 
    - only display output if there is an error 
    - log caller information
- WXS validation error fixes
    - Remove unused `ExitDialog` to fix ICE82
    - Add KeyPath to `SetPath` to fix ICE18
    - Use `HKMU` which translates to `HKLM` to runtime to fix various validation errors about creating the shortcut
- Suppress Validation errors
    - suppress ICE61, which is about same version upgrades being allowed
    - suppress ICE57, caused by the shortcut not being installed per user

* revert tests marked pending in PowerShell#6230 (PowerShell#6251)

* Fix the terse output on Windows for unelevated test run (PowerShell#6252)

* Fix the terse output on Windows for unelevate test run

* Make the regex pattern more accurate

* use add instead of invoke web request in nanoserver docker file (PowerShell#6255)

* change the artifact count for wixpdb (PowerShell#6254)

* Fix `Start-PSPester` to include or exclude 'RequireSudoOnUnix' tag smartly on Unix (PowerShell#6241)

If `-sudo` is specified, make sure to include 'RequireSudoOnUnix' tag on Unix if the 'Tag' is not specified.
If `-sudo` is not specified, make sure to exclude `RequireSudoOnUnix` tag on Unix if the 'ExcludeTag' is not specified.

* Add 'Path' alias to '-FilePath' parameters and others for several commands (PowerShell#5817)

* Restore modules from the NuGet package cache by using dotnet restore (PowerShell#6111)

* Remove AppVeyor specific cmdlet from 'Start-NativeExecution' (PowerShell#6263)

Refreshed the cache by running `dotnet nuget locals all --clear` before `dotnet restore`.

* FixBuild: Revert the changes to get Pester from NuGet cache (PowerShell#6282)

Attempt to fix the macOS build.
In PowerShell#6263, I tried flushing the cache and it worked in the PR. However, after merging the PR, it turns out the master CI build failed again with the same Pester package restore error. So I'm reverting the change that got Pester from NuGet cache.

* Updated install md bin path (not packaged documentation) (PowerShell#5914)

* Cleanup after Powershell install for CentOS/Fedora Docker Images (PowerShell#6264)

* Adding "yum clean all" to CentOS 7 Dockerfile reduces docker image size by 76MB

* Adding "dnf clean all" to Fedora Dockerfile reduces docker image size by 168MB

* Refactor Web Cmdlets Tests to Pester 4 Syntax (PowerShell#6257)

* Pass with Update-PesterTest
* Search and Replace Pass
* [Feature] Move to BeTrue

* Update docs with test guidelines with RequireSudoOnUnix tag. (PowerShell#6274)

* Updating testing docs with RequireSudoOnUnix tag.

* Enable the pending Save-Help tests in CI (PowerShell#6289)

Some CI level 'Save-Help' tests were disabled in PowerShell#2806 because HelpInfo URIs for powershell modules were broken (tracked by PowerShell#2807). However, they were forgotten to be enabled when the URI issue was fixed. This PR reenables those tests.

* get-childitem -LiteralPath should accept 'Include' or 'Exclude' filter (PowerShell#5462)

* get-childitem -LiteralPath should accept 'Include' or 'Exclude' filter

* Test for OsLocalDateTime property of Get-ComputerInfo. (PowerShell#6253)

* Test for OsLocalDateTime property in ComputerInfo.

* Add TLS1.2 workaround for code coverage script (PowerShell#6299)

* Update CimDSCParser to fix Configuration compilation for DSC (PowerShell#6225)

Update CimDSCParser to fix Configuration compilation for DSC

* MSI: Cause preview builds to install Side by side with release builds (PowerShell#6301)

MSI: Cause preview builds to install Side by side with release builds
- change the upgrade code if there is a preview part of the version

* Make sure explorer context menu can be patched (PowerShell#6302)

Make sure explorer context menu can be patched
- set keypath for explorer log context menu

* Tests for Get-Process Cmdlet for Module and FileVersion parameters (PowerShell#6272)

* Tests for Get-Process cmdlet.

* Tests for Get-Process run as admin.

* Skipping some Get-Process tests on Linux

* Skip test for -FileVersionInfo parameter for Linux because of the bug that cause the command to hang.

* Add checks for ErrorId in Get-Process tests

* Change one Get-Process test status to pending for MacOs

* MSI: Make sure that file components are patchable (PowerShell#6303)

MSI: Make sure that file components are patchable
- avoid changing names and guids of components between builds as this prevents patch generation
- This required submitting the file generated by heat
- add code to make sure the generated file is not out of date

* Add support for Debian in installpsh-debian.sh (PowerShell#6314)

The script installpsh-debian only works for Ubuntu distributions. This PR adds support for Debian as well.

Related issue:  PowerShell#5700

* Remove support for Ubuntu 17.04 in installpsh-debian.sh

* Rename some tests because they are duplicates (PowerShell#6312)

Also remove a couple of language tests which were actually duplicated
Change the one loop which loops through test cases to include an iteration number to remove test name duplication

* Use new Pester syntax: -Parameter for Pester tests in Modules/CimCmdlets (PowerShell#6306)

* Use new Pester syntax: -Parameter for Pester tests in Modules/CimCmdlets.

* make Linux packages use correct version scheme for preview releases (PowerShell#6318)

Fixes PowerShell#6315

make Linux packages use correct version scheme for preview releases
- Now uses <Major>.<Minor>.<Patch>~<PreviewName> instead of <Major>.<Minor>.<Patch>-<PreviewName> as the - was interpretted as an iteration of the release not a preview.

* markdown test: use strict in javascript (PowerShell#6328)

* Clean build during daily build to ensure MSI package is generate correctly (PowerShell#6334)

Clean build during the daily build to ensure MSI package is generated correctly
- Do another clean build directly before packaging to clean up files that test has added

* Build: Only restore once (PowerShell#6335)

* don't restore with every publish

* Exclude lines about Pester executing test scripts from terse logs (PowerShell#6336)

* Rename log and logerror to Write-Log  [$message] [-error] (PowerShell#6333)

Fix PowerShell#6332
This change renames log and logerror functions to a single Write-Log [$message] [-error] function to avoid conflicting with the log command on MacOS.

* Specify the runtime when running 'dotnet restore' in 'Start-PSBuild' (PowerShell#6345)

* Build: Remove two unneeded lines from 'Invoke-AppveyorFinish' (PowerShell#6344)

* Make relation-link handling in web cmdlets case insensitive (PowerShell#6338)

* Make sure package verification failure fails the AppVeyor build (PowerShell#6337)

* Make a relative redirect URI absolute when 'Authorization' header present (PowerShell#6325)

* Add negative tests for Copy-Item over remote sessions (PowerShell#6231)

* Add '-Restore' when build win-arm and win-arm64 (PowerShell#6353)

* Added Service Point Manager call to force Tls12. (PowerShell#6310)

Calls [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 during bootstrap to download PowerShell core to avoid an error.

* Use new Pester syntax: -Parameter for Pester tests in Microsoft.PowerShell.Management module. (PowerShell#6294)

* Clean the intermediate artifact 'psoptions.json' from build (PowerShell#6356)

* When doing daily/test build in a non-release branch use the branch name as the preview name  (PowerShell#6355)

* fix errors in start-psbootstrap during release builds (PowerShell#6159)

set Debian front end to non-interactive during apt-get commands, to avoid error with prompting
add libffi-dev, which is required for ruby/fpm
let fpm update to the latest

* Minor code clean-up changes (PowerShell#5737)

* Add no appimage build (PowerShell#6380)

* MSI: update architecture specific filenames (PowerShell#6379)

* Support non-GitHub commits in the change log generation script (PowerShell#6389)

* Add lambda support to -replace operator

Add support for replacement lambdas when using the -replace operator.
Requires minimal changes to existing code by using the following overload:
    Regex.Replace(string input, MatchEvaluator evaluator)
when a ScriptBlock is passed in as the replacement argument.

* Pass the 'Match' object to $_ for the substitute script block in '-replace' operation (PowerShell#6029)

* Update CODEOWNERS

* Use new Pester syntax: -Parameter for Pester tests in engine. (PowerShell#6298)

* Use new Pester syntax: -Parameter for Pester tests in engine.

* Build: Remov version forcing code from NuGet package generation (PowerShell#6390)

* Update version numbers to 6.0.2 (PowerShell#6402)

* Add script to update the version number
* Update version to 6.0.2

* Update to DotNet 2.0.6 (PowerShell#6403)

Update to DotNet 2.0.6
  - this addresses [Microsoft Security Advisory CVE-2018-0875: Hash Collision can cause Denial of Service](PowerShell/Announcements#4)
  - This is a port of PowerShell@d607f20 to 6.1

* Fix 'PropertyOnlyAdapter' to allow calling base methods (PowerShell#6394)

For a PropertyOnlyAdapter, the property may come from various sources, but methods, including parameterized properties, still come from DotNetAdapter. So, the binder can optimize on method calls for objects that map to a custom PropertyOnlyAdapter.

* Add configuration for https://github.com/probot/stale (PowerShell#6393)

* Add yml for https://github.com/probot/stale

* Standard deviation implementation on Measure-Object (PowerShell#6238)

Implement iterative standard deviation algorithm for Measure-Object

* Add 'NullReference' checks to two code paths related to 'PseudoParameterBinder' (PowerShell#5738)

1. Add a null check in the tab completion code on the binding result returned from `PseudoParameterBinder`;
2. Add a null check in `CommandDiscovery.LookupCommandProcessor` on the `CommandInfo` object returned from the method `LookupCommandInfo`.

* Correct the '%c', '%l', '%k', '%s' and '%j' formats in 'Get-Date -UFormat' (PowerShell#4805)

* Add `Waiting - DotNetCore` label (PowerShell#6406)

Also, organize labels in alphabetical order.

* Update to Governance doc to reflect current working model (PowerShell#6323)

With some changes in the PowerShell Team, need to update Governance doc to reflect current working model being used

* Make Resolve-Path -Relative return useful path when $PWD and -Path is on different drive (PowerShell#5740)

* commands: make rvpa -relative do not return ./absolute_path

This happens on Windows when $pwd and -path is on different drive

* only return relative path inside current root

* fix secret and JavaScript compliance issues (PowerShell#6408)

fix secret and JavaScript compliance issues
- mark secrets as a test only secrets
- make javascript use strict in a specific function

* Change 6.0.1 references to 6.0.2 for 'linux.md' (PowerShell#6411)

* Stop 'ConvertTo-Json' when 'Ctrl+c' is hit (PowerShell#6392)

* Update the 'ChangeLog.md' for 6.0.2 release (PowerShell#6417)

* Update 'macos.md' and 'windows.md' with the version number '6.0.2' (PowerShell#6416)

* remove runas.exe from tests as we have tags to control this behavior (PowerShell#6432)

remove runas.exe from tests as we have tags to control this behavior
- this should reduce the likelihood of errors

* migrate the mac offical binary build to VSTS mac hosted preview (PowerShell#6363)

create a PowerShellPackage...ps1 that works with these VMs (vs our custom VM)
create a script to create the \powershell folder with correct permissions
a YML VSTS build definition

* MSI: remove the version from the product name (PowerShell#6415)

MSI: remove the version from the product name

During patching the original MSI information is displayed.
This makes installing a patch for an MSI with a specific version very confusing.

* Fix the NullRefException when using '-PipelineVariable' with 'DynamicParam' block (PowerShell#6433)

* Add Alpine Linux support (PowerShell#6367)

sys/sysctl header is not available in musl-libc based systems and system calls are available without any header inclusion. I have ported the cmake test from CoreFX repo (https://github.com/dotnet/corefx/blob/431475b8/src/Native/Unix/configure.cmake#L560).

Progress towards: PowerShell#4605

* Change `Get-FileHash` tests to use raw bytes (PowerShell#6430)

* Change filehash tests to use raw bytes

* Remove testablescript.ps1 from Get-FileHash tests

* Use BOM-less UTF8 input for Get-FileHash

* Use new Pester syntax: -Parameter for Pester tests in Language. (PowerShell#6304)

* MSI: update path with proper value (PowerShell#6441)

MSI: update path with proper value
- Add verification that path is updated

* Fix error in windows provider when the environment as an existing set of variables name that only differs by case (PowerShell#6320)

- make the provider storage for the environment on windows ignore duplicates
- add tests to verify existing environment get-item behavior

* Throw better parsing error when statements should be put in named block (PowerShell#6434)

* Make '-CI' not depend on '-PSModuleRestore' in 'Start-PSBuild' (PowerShell#6450)

* Restore for official Linux arm builds (PowerShell#6455)

* Restore for official Linux arm builds (PowerShell#6455)

* Use 'Unregister-Event' to remove an event subscriber when removing 'PSEdit' function (PowerShell#6449)

* Fix release packaging build (PowerShell#6459)

The release packaging build needs to have 'dotnet' in path, fixed that by adding Find-DotNet
Refactored restore logic so it can be used from both Start-PSBuild and Copy-PSGalleryModules

* Fix release packaging build (PowerShell#6459)

The release packaging build needs to have 'dotnet' in path, fixed that by adding Find-DotNet
Refactored restore logic so it can be used from both Start-PSBuild and Copy-PSGalleryModules

* Use new Pester syntax: -Parameter for Pester tests in modules: Microsoft.PowerShell.Utility and Microsoft.WSMan.Management. (PowerShell#6366)

* Add '-AsArray' parameter to 'ConvertoTo-Json' command (PowerShell#6438)

Add `-AsArray` parameter to `ConvertoTo-Json` command to always pack the output string in array brackets, even if the input is a single object.

* Update tests in Modules/Microsoft.PowerShell.Diagnostics to use new Pester syntax. (PowerShell#6351)

* Update tests in Modules/Microsoft.PowerShell.Core to use new Pester syntax. (PowerShell#6349)

* Update tests in Microsoft.PowerShell.Security folder to use Pesterv4 syntax (PowerShell#6256)

* Upgrade tests in test\powershell\Host folder to PesterV4 syntax (PowerShell#6250)

* Update change log for 6.1.0-preview.1 (PowerShell#6480)

* Update docs for v6.1.0-preview.1 release (PowerShell#6481)

* Update docs

* Added the missing 'stable' label

* Update stale bot message (PowerShell#6462)

Fix PowerShell#6446

Add "Community members are welcome to grab these works."

* Add Test-Json cmdlet (NJsonSchema) (PowerShell#5229)

Resolve PowerShell#4220.

The cmdlet is based on NJsonSchema.
It allows to check:

JSON by only parsing
JSON against Schema
implicitly check Schema by parsing (based on previous line check)
NJsonSchema is under MIT (approved see PowerShell#5229 (comment))

* Add -Resume Feature to Web Cmdlets (PowerShell#6447)

Fixes PowerShell#5964

Adds -Resume switch to Invoke-WebRequest and Invoke-RestMethod

-Resume requires -OutFile

Enables the ability to resume downloading a partially or incompletely downloaded file.

File Size is the only indicator of local and remote file parity.

If the local file is smaller than the remote file and the remote endpoint supports resume, the local file will be appended with the remaining bytes.

If the local file is larger than the remote file, the local file will be overwritten

If the remote server does not support resume, the local file will be overwritten

If the local file is the same size as the remote file, the remote endpoint will return a 416 status code. This response is special-cased as a success in this instance. The local file remains untouched and it is assumed the file was already successfully downloaded previously.

If the local file does not exist it will be created and the entire remote file will be requested.

Added tests for all code new code paths (I'm pretty sure anyway)

Added /Resume Controller to WebListener

Documented /Resume Controller

Updated .spelling to reflect terms in WebListener docs

Note: I had to change the way GetResponse() tracks the current URI as we now have 3 places where the call is taking place. I don't foresee this causing any regressions. This area needs some refactoring. especially if we want to implement a retry mechanism

* MSI: add function to generate a MSP (PowerShell#6445)

add a function to generate an MSP

* Add the parameter '-Not' to 'Where-Object' (PowerShell#6464)

* Doc: Update Ubuntu source creation commands to use 'curl -o' (PowerShell#6510)

Updated the Ubuntu source creation commands to remove the need for piping

* Fix error in windows provider when the environment has accidental duplicates that differ only by case (PowerShell#6489)

Fix error in windows provider when the environment has accidental duplicates that differ only by case.

Make the provider storage for the environment on windows ignore duplicates
 and only report the effective value.
Add tests to verify existing environment get-item behavior and to ensure that Get-Item env:<var> reports the same as $env:<var>, namely the effective value.
Fixes PowerShell#6305 and supersedes PowerShell#6320 based on discussion in PowerShell#6460.

* Update Dockerfile test to use ubuntu 17.10 as the base image (PowerShell#6503)

* Make sure that the width of the header is at least the size of the label (or propertyname) (PowerShell#6487)

* Enable [Environment]::OSVersion to return current OS rather than compatible version (PowerShell#6457)

* add application manifest dictating compatibility so that osversion shows appropriate os version on Windows

* Change the 'SaveError' method in Parser to use `nameof` for error ids (PowerShell#6498)

Many error messages in PowerShell currently use a LINQ expression to pass both the name of the error and the message through in the error processing. This PR uses the `nameof` feature to carry the error name/ID and gets rid of LINQ expression reflection, hopefully improving performance, especially in editor scenarios.

* Use new Pester syntax: -Parameter for Pester in SDK and Provider tests (PowerShell#6490)

* Add PowerShell logging tests for macOS and Linux (PowerShell#6025)

This PR fixes the logging issue on Linux where logging is initialized before `-settingsFile` is parsed causing custom log settings to be ignored. (see ConsoleHost.cs and ManagedEntrance.cs)

The PR also includes basic logging tests for Linux and MacOS. PSSyslog.psm1 contains the functions to retrieve selected logged items (based on PowerShell's log id and a timestamp) and Logging.Tests.ps1 contains tests for Linux and MacOS.

* Make LanguagePrimitive.GetEnumerable treat 'DataTable' as Enumerable (PowerShell#6511)

* Make LanguagePrimitive.GetEnumerable treat 'DataTable' as Enumerable

* Use new Pester syntax: -Parameter for Pester tests in modules: PowerShellGet, PackageManagement, PSReadLine (PowerShell#6488)

* Fixed scenarios where `NullOrEmpty` string was used instead of `-BeNullOrEmpty` (PowerShell#6535)

* Remove empty `Should -Be` statements (PowerShell#6536)

* Simplify the paths the MSI uses (PowerShell#6442)

- Implementation of PowerShell/PowerShell-RFC#115 (If anything changes in the RFC, we will treat it as a bug, and fix it later)
- Update registry and directory paths to use 6 for the version for stable and 6-preview for a preview release
- Add checkbox to set path
- default checkbox to off for preview builds and on for stable builds

* Remove duplicate 'Restore-PSPackage' (PowerShell#6544)

* Mark Save-Help PackageManagement tests as pending (PowerShell#6545)

* Update 'Update-Help' to save help content in user scope by default (PowerShell#6352)

Add the parameter `-Scope` to `Update-Help`, which takes `AllUsers` or `CurrentUser`. The default value is `CurrentUser`.

* Clean up workflow logic in the module loading component (PowerShell#6523)

Clean up workflow logic in the module loading component.
Workflow module is not supported in PSCore.
Currently, Import-Module throws a terminating error when seeing .xaml modules. After the change, Import-Module throws a non-terminating error when seeing .xaml modules.

* Updating solution file with new project type guids

* Removing invalid resources to make Visual Studio builds compile.

* Add Unix project to sln

* Map configurations to correct configurations

This reverts commit 9cbf601.

* Fix formatting of tables where headers span multiple rows (PowerShell#6504)

* In cases where the header spans multiple rows, need to correctly calculate whitespace and trim appropriately

* Use System.Span<int> and C# 7.2 language in SMA

* Added new ref assemblies to Files.wxs
refactor tests to remove similar xml content
added single column test case

* add comment about project guids

* change project type for unix project

* add mappings for unix project

* Add comments about configuration mappings

* rename solution to powershell

* Terminate the loop in PsUtils.GetMainModule() which was infinite in case there was no main module. (PowerShell#6358)

* Terminate the loop in GetMainModule if main module is null.

* Run tests with FileVersionInfo also on non-windows platforms. Add test for process which main module can be null.

* Fix error when 'Format-Wide -AutoSize | Out-String' is called. (PowerShell#6491)

* Add checking if an output width is specified.

* change _failedToReadConsoleWidth variable to _noConsole bool value. 
This variable is to cache the default console width when failed to get 'Console.WindowWidth' value.

* Add ported Test-Connection cmdlet (PowerShell#5328)

The Test-Connection cmdlet works on Windows and Unix.

Implemented:
Ping
Continues Ping
Traceroute
Detect MTU size (seems don't work on Unix because of .Net Core issue)
Connect to TCP port
Not jet implemented:
I'm putting this off for the future.

Detect blackhole routers
PingPath
Additional considerations
As you can see in the tests .Net Core has issues in API implementation. As a result, some tests are skipped on Unix. There is also one issue on Windows. Related comments added to tests.
I'm going to open an issue(s) in CoreFX repo.

I think we should break the feedback into two parts:

scripting functionality
interactive functionality (display output)
Now I have implemented the output to the screen as the progress bar and as text (without ETS) - we have to decide what is best to use.

* Fix running 'pwsh' produced from 'dotnet build' (PowerShell#6549)

* Fix line ending in 'DefaultCommands.Tests.ps1' from CRLF to LF (PowerShell#6553)

* Engine: Fix several code cleanup issues (PowerShell#6552)

* Remove the FullCLR-only symbol-info related code from 'EventManager.cs' (PowerShell#6563)

This is because the `AssemblyBuilder` family types do not support emitting symbol information in .NET Core.

* Use C# latest language in proj files (PowerShell#6559)

Address PowerShell#6547

We begin using C# 7.2 features (Span) but .Net Core doesn't seem use "Latest" as default for a language.
So we explicitly set the value.

* Use -Throw and -ErrorId native Pester parameters. (PowerShell#6574)

* Support 'user@host:port' syntax for SSH Transport (PowerShell#6558)

* Update installpsh-<distrofamily>.sh Installers to Handle "preview" in version number (PowerShell#6573)

* Improve PSMethod-to-Delegate conversion (PowerShell#6570)

Two small improvements:
1. Avoid unnecessary reflection in `ConvertPSMethodInfoToDelegate`. `PSMethod` already has the `MethodInfo` information with its `adapterData` field.
2. Avoid creating the generic `PSMethod<>` type for `PSMethod` that represents constructors, because constructors cannot be converted to a delegate anyways. In case that the `PSMethod` represents constructors, we use a simple `PSMethod` instance instead.

Also, rename the type `Unit` to `VOID` to make it more readable, since that type represents `typeof(void)`.

* Added check for existence of Location HTTP header before using it (PowerShell#6560)

The HTTP RFC (https://tools.ietf.org/html/rfc7231#section-6.4) does not require a Location header to be present for redirects, thus it is required to check if the Location header is returned before using it.

* Fix Copy.Item.Tests.ps1 (PowerShell#6596)

Fix formatting, absent parameter names and use -Throw and -ErrorID parameters with Should function.

* Fix formatting in Convert-Path.Tests.ps1. (PowerShell#6595)

* Fix formatting in Clear-Item.Tests.ps1. (PowerShell#6593)

* Fix formatting Clear-EventLog.Tests.ps1 (PowerShell#6594)

* Fix typos and formatting in Clear-Content.Tests.ps1 (PowerShell#6592)

* Fix typos and formatting.
* Capitalize function parameters.

* Added line break to Acess Denied error message. (PowerShell#6607)

* Some fixes  in Get-Date -UFormat (PowerShell#6542)

* Use UTC datetime in Get-Date -UFormat %s
Fix %l output from 0..11 to 1..12
Fix %V using Gregorian calendar

* Use a workaround for ISO 8601 week of year (uformat %V)

* Add Missing Start-WebListener to Web Cmdlet Tests (PowerShell#6604)

* make gem use sudo for macOS (PowerShell#6610)

gem install requires sudo on official macOS build VMs.
- make bootstrap use sudo for macOS

* Create the default PSSession configuration, not tied to a specific PowerShell version. (PowerShell#6519)

Create the default PSSession configuration, not tied to a specific PowerShell version.

When Enable-PSRemoting command is run, it creates 2 sessions configurations:

first, the same as it was before with the name containing the current version expressed as: 'PowerShell.$PSVersionTable.GitCommitId'
second with the default name 'PowerShell.6' so that administrators wouldn't have to guess which specific version is installed on the target.
PR addresses the issue: PowerShell#6470

* Improve performance of parsing RegexOption for '-split' by using if branches (PowerShell#6605)

* Engine: Make some minor cleanup changes (PowerShell#6609)

- Remove the calls to `GetTypeInfo()` in the generated `.resx` binding C# binding code (change in the tool `ResGen`).
- Remove the unused methods in `SessionState.cs`.
- Remove the calls to `GetTypeInfo()` from `Compiler.cs` and other files in `engine\runtime`.
- Fix typos in `VariableAnalysis.cs` and `ClassOps.cs`.
- Minor perf improvement in `MutableTuple.cs` by using indexing instead of linq extension method `last()`.

* Engine: Clean up unneeded 'GetTypeInfo()' calls in interpreter code (PowerShell#6613)

Clean up unneeded `GetTypeInfo()` calls in interpreter code.
The `GetTypeInfo()` calls were added back in the early days of .NET Core, when most of the properties and methods of `System.Type` were removed. Now those properties and methods are back in `System.Type`, so there is no need to keep those calls.

* Make the 'PSISERemoteSessionOpenFile' a support event (PowerShell#6582)

Make the `PSISERemoteSessionOpenFile` a support event, so that `Get-EventSubscriber` won't show that subscriber. `Get-EventSubscriber -Force` can still show the support event subscribers. `Unregister-Event -Force` needs to be used to remove a support event subscriber.

The event subscriber for `PSInternalRemoteDebuggerStopEvent` and `PSInternalRemoteDebuggerBreakpointUpdatedEvent` are already made support events. And this PR makes it the same for `PSISERemoteSessionOpenFile`.

* Fix formatting in Add-Content.Tests.ps1 file. (PowerShell#6591)

* Fix formatting.
* Capitalize TestDrive and add empty strings.

* fix error about setting readonly variable (PowerShell#6617)

* Re-order UFormat options in Get-Date (PowerShell#6627)

Place in alphabetical order the options

* Support importing module paths that end in trailing directory separator (PowerShell#6602)

* Remove support for file to opt-out of telemetry, only support env var (PowerShell#6601)

Since a PR added support to opt out of telemetry via an environment variable, we can remove the,
always intended to be a temporary, solution of deleting a file to opt out of telemetry since the
environment variable can be defined at the system level and exist before even installing PowerShell Core.

Because the variable is defined as opt out, a value of true, yes, or 1 means no telemetry is sent.

* Fix for the Register-PSSessionConfiguration command (PowerShell#6630)

Fix for the Register-PSSessionConfiguration command, as some tests were failing in: https://ci.appveyor.com/project/PowerShell/powershell-f975h
Probably because of changes in PowerShell#6519

* Clean up 'GetTypeInfo()' calls under engine/parser (PowerShell#6636)

`GetTypeInfo()` were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in `System.Type` were missing at that time. Now the call is not needed anymore and should be removed.

* Add meta properties to mac VSTS yml (PowerShell#6619)

Add meta properties to mac VSTS YAML
- Add a property to clean the build machine
- Add a property to set the format of the build name
- add a property to set which queue to run the build in

* Clean up 'GetTypeInfo()' calls in 'help', 'cimSupport' and 'DscSupport' folders (PowerShell#6633)

'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.

* Clean up 'GetTypeInfo()' calls in other engine sub-folders (PowerShell#6635)

'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.

* Clean up 'GetTypeInfo()' calls in engine folder (PowerShell#6634)

'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.

* Remove extraneous SSH and install docs from the 'demos' folder (PowerShell#6628)

* Formatting: Use cache for dash padding strings (PowerShell#6625)

* Reformat Format-Table tests (PowerShell#6657)

* Convert identations to spaces
* Remove alias tests and extra lines
* Remane extra Describe
* Remove extra parentheses and add spaces

* Port Windows PowerShell AppLocker and DeviceGuard UMCI application white listing support (PowerShell#6133)

These changes port Windows PowerShell support for Applocker and DeviceGuard User Mode Code Integrity (UMCI) to PSCore6. Windows PowerShell uses public APIs to determine if a system is in locked down mode via AppLocker or DeviceGuard, and automatically runs in constrained language mode. For more information about PowerShell constrained language, see: https://blogs.msdn.microsoft.com/powershell/2017/11/02/powershell-constrained-language-mode/

This support for application whitelisting has mostly existed in PSCore6, but the primary APIs were stubbed out in CorePSStub.cs because they relied on Windows only DeviceGuard (wldp.dll) and AppLocker (Safer APIs) public APIs. These changes re-implement PowerShell lock down APIs on PSCore6 for Windows platforms only. The AppLocker and DeviceGuard public APIs are currently only implemented in Windows OSes and are not supported on Linux or MacOS platforms.

Tests have also been ported to PSCore6 and run only for Windows platforms.

* Reduce allocations in TableWriter (PowerShell#6648)

* [Feature] Reduce allocations in TableWriter
* Revert iterator
ReadOnlySpan is not supported in iterators
* Use columnsThresHold with stackalloc

* Add new reliable tests for Get-Date -UFormat (PowerShell#6614)

* Add tests for Format-Table -Wrap (PowerShell#6670)

* Correct a typo in comment for 'Invoke-WebRequest' (PowerShell#6700)

* Add '-WorkingDirectory' parameter to pwsh (PowerShell#6612)

Add `-WorkingDirectory` parameter to `pwsh` to allow starting in right working directory.

* Pretty print Export-FormatData XML output (PowerShell#6691)

Pretty print Export-FormatData XML output by default.
Refactor Export-FormatData tests, remove test duplications.
sdwheeler pushed a commit to MicrosoftDocs/PowerShell-Docs that referenced this pull request Aug 6, 2018
* resolves 5817 (#2148)

add Path alias to DestinationPath for Save-Help
add Path alias to SourcePath for Update-Help
add Path alias to BinaryPathName for New-Service
add Path alias to FilePath for Start-Process, Set-TraceSource, Tee-Object, Trace-Command, Invoke-WSManAction, New-WSManInstance, and Set-WSManInstance

* Bringing even with staging (#2191)

* Merging latest changes to Live (#2144)

* Updates configurations.md (#1855)

Two set of changes made.
- Example scripts e.g. MyDscConfiguration.ps1 define the configuration inside them and call the configuration at the end line. Removed the call to the configuration at the end. Since the article demonstrates dot-sourcing the file and calling the configuration explicitly.
- Fixed typo in the file name (TEST-PC1.mof  to localhost.mof ), since the ComputerName was not specified it should default to using 'localhost' as the default argument for it.

P.S. - There is a comment on the web-page regarding the fixes made

* Fix typo in comment (#1854)

* Updating the help content for v6. (#1853)

* Updating the help content for v6.

* Address code review comments

* Fix broken links

* Fix example numbers in about_Transactions.md (#1859)

Example number '7' is duplicated.

* Update Alias-Provider.md (#1831)

1. Removed statement that an alias is to an executable, the definition cotnains the path. It may - but does not need to be. For example:
Try Set-Alias np Notepad then look at the definition.
2. Clarified that an alias can also be to a powershell script (ps1 file).
3. Tidied up the language removing multiple 'And,' clauses to improve readability.

* Add documentation of new -AsHashtable switch for ConvertFrom-Json introduced by PR #5043 (#1858)

* add documentation of new -AsHashTable switch for ConvertFrom-Json and also document the behaviour in case of duplicate strings.

* correct casing of -AsHashtable switch.

* Address PR comments about -AsHashtable switch for ConvertFrom-Json.md

* Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md

* Revert "Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md"
Accidentally change the wrong field.
This reverts commit 6e76191.

* Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md

* Fix example numbers in Invoke-WebRequest.md (#1862)

Example number '4' is duplicated.

* reformatting and integrating changes from PR#1831 (#1860)

* Fix example numbers in Get-Help.md (#1869)

Example number 12 and 13 are missing.

* Fix example numbers in Import-Module.md (#1868)

Example number '10' is duplicated.

* Fix example number in ConvertTo-Html.html (#1867)

Example number '10' is duplicated.

* Update dscCiCd.md (#1865)

Missing a period on line 378. Should be `$(Build.ArtifactStagingDirectory)\` not `$(BuildArtifactStagingDirectory)\`.

* Web Cmdlets 6.0.0 Documentation Refresh (#1870)

* Web Cmdlets 6.0.0 Documentation Refresh

* Address PR Feedback

* Merge Example 4 and 5 in Get-Member.md (#1874)

Example 4 and 5 in Get-Member.md v3.0 and v4.0 are almost the same. They should be merged as with v5.0.

* Remove hash algorithms unsupported in v6.0 (#1873)

MACTripleDES and RIPEMD160 are no longer supported in v6.0.

* Update outputs of Get-Verb (#1872)

Since v6.0, `Get-Verb` returns  not MemberDefinition but VerbInfo that has Verb and Group properties.

* Fix typo in ConvertTo-Html.md (UTF-x) (#1879)

* Fix "Accept wildcard characters" in Get-Service.md v6 (#1878)

* Fixed "False" -> "True" (`DisplayName`, `Exclude`, `Include`, and `Name`)
* Removed `InformationAction` and `InformationVariable`

* Fixed Get-WindowsFeature cmdlet HyperLink (#1877)

* Fixed Get-WindowsFeature cmdlet HyperLink

Minor edit.  Update Get-WindowsFeature cmdlet HyperLink to https://technet.microsoft.com/library/jj205469(v=wps.630).aspx

* Changed URL to new docs.microsoft.com location

The TechNet URL did not work. TechNet and MSDN are being retired.

* Update Get-WinEvent.md (#1876)

Removed future tense in a couple of places to improve readability. Minor edit.

* Update Example 8 in Get-Process.md (find the owner of a process) (#1875)

* Update Example 8 in Get-Process.md (Find the owner of a process)

* Update to attempt to avoid build errors

It seems that the build system does not accept multiple script blocks per one Example header.

* updated localmachine\Root to LocalMachine\My (#1880)

The example where we import the PFX on the target node should import the cert into Personal store and not root.

* Update Group property example in Get-Verb.md (#1881)

* adding missing space (#1885)

* removing stray character (#1886)

* Update Example 9 in Get-Process.md (#1888)

* powershell -> pwsh (only v6.0)
* Windows PowerShell -> PowerShell

* Remove "About ISE" files of v6.0 (#1891)

* Remove "About ISE" files of v6.0

ISE is no longer bundled with PowerShell 6.0.

* Remove links for "About ISE" files of v6.0

* Update Get-Process.md (#1890)

Fixed name parameter details to show it accepts wildcards in the name

* Update productincompat.md (#1892)

The list of compatible systems should include Skype For Business Server 2015 and Lync Server 2013.

* Update unapproved verbs examples in Get-Verb.md (#1896)

* Updated Example 4
* Removed Example 5

* Removing extra space in the Example 5A script (#1894)

It was highlighting as string in the documentation, I was trying to remove all the extra space.

* fixing merge conflict

* updates to style and contrib

* tweak format

* tweak format 2

* fix typo

* fix number list example

* adding review feedback

* fix broken links

* incorporating feedback from zach

* reformatting About_* for 80 columns - part 1

* reformat about_*

* reformatting About_* topics - Part 2

* fixing broken links

* fixing more broken links

* more broken links fixed

* Fix parameter's position in Get-Random.md (#1901)

* Fix parameter's position in Measure-Command.md (#1905)

* Fix parameter's position in Trace-Command.md (#1904)

* Actually call the configuration in the example (#1906)

On line 74, it says...

"The last line of the example containing only the name of the configuration, calls the configuration."

This change actually makes that call.

* reformatting About_* for 80 columns - part 3 (#1902)

* reformatting About_*

* reformatting About_* part 3

* fixing broken links

* fixing more broken links

* one more time with the links

* reformatting About_* for 80 columns - part 4

* Adding PreRelease versioning info for PSGallery & PSGet (#1903)

* PowerShellGet PreRelease Support

Adding descriptive doc for pre-release versioning support

* Correcting typos in pre-release doc

Minor typos and case issues fixed

* Updated prerelease info based on feedback

Mostly cosmetic updates. Functional change: added line 28, stating we only support 3-segment module versions.

* Adding prerelease to module install update find save commands

* Updating PSGet -Script commands for Prerelease support

* Hyphen listed as optional rather than preferred in Prereleasestring

* Minor corrections from Rebro review

* Addressing @sdwheeler feedback on links and double slashes

* Fixing broken link

* Update PreReleaseScript.md

* Style tweaks in STYLE.md (#1913)

* Fix YAML metadata on "Understanding Concepts" (#1911)

I'm not quite sure what this means, but it certainly looks terrible on docs.microsoft.com when it's malformed.

(To be perfectly honest, I only managed to even figure out it's called "YAML metadata" by peeking at the DOM of github's HTML.)

* Fix parameter's position in Join-Path.md (#1909)

* typo correction on line 85 (#1916)

E:\Windows\Sytem32 sould be E:\Windows\System32

* Fix parameter's position in Get-TraceSource.md (#1917)

* Changed required PSGet version to 1.6.0 (#1920)

* Update Example 5 in Get-Process.md (#1923)

* fixing backlashes reported in PR1921 (#1924)

* fixing backlashes reported in PR1921

* found more backslashes

* reformatting About_* for 80 columns - part 5

* reformatting About_* for 80 columns - part 6

* incorporating review feedback

* reformatting About_* for 80 columns - part 7

* Fixed formatting of output per issue #808

* Fix typo in syntax description (#1931)

* Fix parameter's position in ConvertTo-Xml.md (#1929)

* Remove descriptions about ComputerName parameter in Get-Process.md v6.0 (#1928)

* Line 192  Single Quote Breaks Example (#1930)

* Line 192  Single Quote Breaks Example

* clarified the example for -Regex

* Update Example 2 in Get-Alias.md (ineffective Exclude) (#1935)

`-Exclude Get-*` is ineffective because there are no aliases that begin with `Get-`.

* Fix formatting: DESCRIPTION section in ConvertTo-Xml.md (#1934)

* Fix typo in Unregister-ScheduledJob (#1932)

* Update Unregister-ScheduledJob.md

* Update Unregister-ScheduledJob.md

* Update Unregister-ScheduledJob.md

* Update Unregister-ScheduledJob.md

* Fix parameter's position in ConvertFrom-Csv.md (#1937)

* fix typo on metaConfig.md (#1936)

fixed typo

* Quick edits (#1938)

* Changed required PSGet version to 1.6.0

* Fixes to PSGet TOC and WMF 5.1 compat page

* Update Get-Item.md (#1942)

Proof-read some of the examples. The first two were wrong entirely: The user must be in the ps-test folder for the result shown to happen.

* Add description about Format-Hex -InputObject (#1939)

* Fix parameter's position in Add-Member.md (#1946)

* Fix parameter's position in Select-Object.md (#1945)

* Correcting add to hash table example (#1944)

* Update about_Hash_Tables.md

corrected add to hash table example in 3.0

* Update about_Hash_Tables.md

corrected add to hash table examples in 4.0

* Update about_Hash_Tables.md

corrected add to hash table example in 5.0

* Update about_Hash_Tables.md

corrected add to hash table example in 5.1

* Update about_Hash_Tables.md

corrected add to hash table example in 6

* Fix Set-TraceSource -ListenerOption parameter (#1949)

* Fixed the value of "Accepted values:"
* Fixed minor differences in formatting and wording

* Fix Trace-Command -ListenerOption parameter (#1948)

* Fixed the value of "Accepted values:"
* Fixed minor differences in formatting and wording

* Fix parameter's position in Select-Xml.md (#1953)

* Fix Get-Alias -Name parameter (#1952)

* Position: 0
* Default value: All aliases
* Accept wildcard characters: True
* Fixed minor differences in formatting and wording

And also removed InformationAction/InformationVariable in v6.0.

* Wmf 5.1 cleanup (#1950)

* Changed required PSGet version to 1.6.0

* Fixes to PSGet TOC and WMF 5.1 compat page

* Add note explaining WMF does not ship in Windows

* Typo fix ("you will are not" -> "you will not"). (#1951)

* Typo fix ("you will are not" -> "you will not").

* Changed from passive voice to active voice

* added article about formatting code samples

* fixing typos

* fixed typos and incorporated feedback

* updating metadata tags in docfx.json

* fixing filename spelling

* Fix parameter's position in Get-Content.md (#1959)

* Fix parameter's position in Get-Member.md (#1958)

* Update PSGallery "Items Tab" (for the new prerelease feature) (#1957)

* Fix link for about_WorkflowCommonParameters in New-PSWorkflowExecutionOption.md (#1962)

* Fix link for about_Types.ps1xml in Update-TypeData.md (#1961)

* Fix parameter's position in Group-Object.md (#1966)

* Fix hex values in about_Arithmetic_Operators.md (#1965)

* Indent headers as subheaders (#1967)

* Update minor typo in Limit-EventLog.md (#1968)

* Update Example 3 in Get-FileHash.md (#1969)

* Fix parameter's position in Tee-Object.md (#1970)

* fixing output example per issue 1933

* fix -Path metadata to reflect wildcard support

* fixing issue 1640

* fixing issue 1651

* Fix link for about_Remote_Requirements (#1976)

* Split parameter set in Sort-Object.md v6.0 (#1975)

Since v6.0, Sort-Object cmdlet has two parameter sets, "Default" and "Bottom".

* Fix link for about_Preference_Variables (#1982)

http://... -> relative path

* Fix broken headers in Get-CimSession.md v6.0 (#1981)

* Update Example 1 in Import-Counter.md (#1980)

* move $OFS to prefs article added note about read-only (#1978)

* Update decisionMaker.md (#1984)

Slight, but critical corrections to the definition of DevOps.

* Update configurations.md (#1985)

* Fix parameter's position in Restart-Service.md (#1993)

* Fix link for logical operators in about_Operator_Precedence.md (#1992)

* Update scriptResource.md (#1986)

Match specified GetScript rule

* Bad link (#1988)

The link "http://go.microsoft.com/fwlink/?LinkId=119096" is supposed to point to a page or a document about "Code-Signing Best Practices".
However, it points to a video about "Understanding Extension INFs and Component INFs".
I watched the whole video and there is nothing inside about "Code-Signing Best Practices".
The best match I have found is the following one: http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b18336565f5b/best_practices.doc
It would be a very good idea to make a web page from this document. Pieces of advice it contains are still accurate.

* Update Example 1 of Protect-CmsMessage (#1987)

The existing example did not specify you needed to create the INF. This not only says so but does so using a script block piped to out-file

* Small edits for mispellings (#1989)

* Corrected command (#1990)

The CanPauseAndContinue property is a boolean so the correct comparison to use is $true rather than "True".

* removing module ref for modules that do not ship in v6-rc2 (#1996)

* Fix parameter's position in Resume-Service.md (#1998)

* Fix link for about_Providers (#1999)

* Help doc enhancement for ConvertFrom-StringData cmdlet (#2002)

* Help doc correction

Removed an unwanted * from Notes section

Corrected intenting for last example

Removed unwanted ... from example 2

* Help doc wnhancements in all versions for ConvertFrom-StringData

Removed an unwanted * from Notes section

Corrected intenting for last example

Removed unwanted ... from example 2

* PowerShell 6 logging on Windows, Linux, and MacOS (#1922)

* First draft of PowerShell 6 logging

* Fix style guideline issues.

* Document logging settings in PowerShellProperties.json

* Address PR Feedback
Limit lines to 80 columns, when possible
Insert <br> in selected locations to improve readability of rendered markdown.

* Reformatted tables

Reformatted tables to work with new processing of About_* topics

* Adding calling the ComputerName parameter to the example (#1964)

* Adding calling the ComputerName parameter to the example

* Changing quotes to brackets

* Removed unused variable in Example 1 (#2004)

The variable was declared but not used.  It also appears in the same place in Example 2 but is used later on.

* Made surrounding text agree with sample code. (#2003)

* Reformatting v4 About_ topics missed in first pass (#2006)

* v4 about scrub missed files

* fixing broken links

* fix broken link

* Reformatting v3 About_ topics missed in first pass (#2005)

* v3 about scrub missed files

* fixing broken links

* fix broken link

* Reformatting v5 About_ topics missed in first pass (#2008)

* v5 about scrub missed files

* fixing broken links

* v5.1 about scrub missed files (#2009)

* Reformatting v6 About_ topics missed in first pass (#2010)

* v6 about scrub missed files

* fixing broken links and removing non-v6 content

* final pass on About_ topic reformat (#2011)

* Corrected Example 3 (#2014)

* Corrected Example 3

Example 3 is an example to remove the user from the group but instead it was removing the group completely.  This change adds the correct syntax to perform what was intended.

See #2001

* minor edits for spacing and metadata

* Enable running pandoc on about topic files (#2012)

* Enable running pandoc on about topic files

* Remove extra line

* Removed --ascii parameter from pandoc as it is not required

* Creates output directory as pandoc needs it (#2018)

* remove alias `sc` to match PSCore6 (#2021)

* Cmdlet help for ConvertFrom-Clixml and ConvertTo-Clixml  (#2022)

* Cmdlet help for ConvertFrom-Clixml and ConvertTo-Clixml for Powershell#3898

* minor edits

- Removed -information* common parameters
- reformat code blocks
- renumbered example

* minor updates

- reformatted examples
- removed common paramters

* update link to about topic

* minor edits

- removed common parameters
- formatted code blocks

* minor edits

- reformatted code blocks
- removed common parameters

* fix broken link (#2024)

* Adding more info to Contributor Guide (#2023)

* adding notes about OPS extensions

* added notes about OPS extensions and linking

* fix typo

* fix typo

* Support lifecycle doc (#1994)

* first pass of support lifecycle doc

* add notes on MIT license

* address slee's comments on support lifecycle

* respond to lifecycle feedback from Sean

* add lifecycle image

* Fixed spelling typo

* add lifecycle to TOC

* respond to feedback on lifecycle

* Removed en-us from URLs

You need to remove locale paths from URLs. Including en-us forces the reader to English rather than being redirected to the localized version of the article that matches their locale.

* add note on 12 months, fix en-us

* Fixed typo

* Move setup/install and remoting docs into PowerShell-Docs (#2026)

This creates a couple new topics around WSMan remoting, SSH remoting, and installing/configuring PowerShell Core. It also adds a topic on using VS Code with PowerShell.

* PowerShell Core 6.0 release notes (#2020)

What's New in PowerShell Core 6.0

* update TOC and change title of setup mac/linux article (#2030)

* update TOC and change title of setup mac/linux article

* fix typos

* attempt to fix images (#2033)

* attempt to fix images

* update to docfx to support images

* Update docfx to add image support (#2040)

* attempt to fix images

* update to docfx to support images

* update root docfx for images

* update docfx for image support

* Update Installing-PowerShell-Core-on-Windows.md (#2042)

The original paged rendered badly - this edit is a move of a 'to do' comment in the MD so as to not break the sentence.

* Fix $PSVersionTable.OS in What's New 6.0 (#2039)

$PSVersionTable.OS is:
x [System.Environment]::OSVersion.VersionString
o [System.Runtime.InteropServices.RuntimeInformation]::OSDescription

* Update WSMan-Remoting-in-PowerShell-Core.md (#2038)

The current example doesn't work for me when specifying the full file path.  It just outputs the file location rather than running the script.  I had to move to the location of the file and run it from there.

The parameter PowerShellVersion also doesn't appear to exist anymore so I have removed that.  

I've also changes file paths to match the 6.0.0 GA release rather than the previous alpha 9.

* Update Get-FormatData.md (#2034)

Updated Get-FormatData Markdown.  Fixes #1895

* Update Get-FormatData Markdown (#2035)

Updated Get-FormatData Markdown.  Fixes #1895

* Updated Get-Runspace Help (#2032)

Updated Get-Runspace Markdown.  Fixes #1883

* updated docfx to try to fix images (#2043)

* attempt to fix images

* update to docfx to support images

* update root docfx for images

* update docfx for image support

* update docfx for images

* Add resource per version in docfx.json (#2046)

* Change 'PowerShellProperties.json' to 'powershell.config.json' in about_logging (#2050)

* OPS Build config changes and minor article edits (#2051)

* clean up warnings from build log

* clean up moniker mapping and add image types to config

* removing unneeded index pages

* fixing typos

* Update New-PSSessionOption.md (#2052)

Missing "are" between "they" and "effective".

* Update Add-Member.md example layouts (#2055)

* Update Add-Member.md

fixed layout of examples 1,2 ,3

* fixed format of example 5

* Removes unnecessary description about the RunAsAdministrator parameter (#2057)

There is no need to have documentation for functions which do not exists in the product.
There is no need to specify in which version this feature was added. Otherwise we need to add such remarks to many other features as well

* Fix Example 2 in Set-PSReadlineKeyHandler.md (#2058)

* Fix Example 1 in Remove-PSReadlineKeyHandler.md (#2059)

* Fix minor Markdown syntax error (#2060)

"Backwards compatibility with Windows PowerShell" anchor reference had incorrect Markdown syntax.

* Update secureMOF.md (#2061)

Update "On the Target Node: create and export the certificate" section

* remove eric and jp from metadata

* update docs to reflect change by https://github.com/PowerShell/PowerShell/pull/5923y (#2064)

* Fix release links/names (6.0.0) (#2056)

Corrected links and names to match the 6.0.0 release

* Removes unexistent RunAsAdministrator parameter from the Syntax section (#2066)

* Fixed path inconsistencies in Set-ItemProperty Example 2 (#2072)

* Corrected path error in Example 2

* Corrected path error in Example 2

* Corrected error in Example 2

* Updated About documentation links to relative paths (#2071)

* Gallery ui manifest (#2073)

* Changed required PSGet version to 1.6.0

* New doc explaining how manifests affect Gallery UI

* Adding new topic to TOC

* Escapes angle brackets in about_Requires (#2075)

This change makes content in this brackets displayable

* add links for topics

* About_Windows_PowerShell_5.1 #1171

* fix typo

* about_Type_Operators issues #1915

* fix typos

* add note about reboot (#2076)

* Removed empty bullet point below notes. (#2078)

A minor typo.

* change PowerShellProperties.json to powershell.config.json (#2079)

* Update metaConfig.md (#2081)

* Update metaConfig.md

* Update metaConfig.md

* Fix typo in code example (#2082)

* Fix example VB code (#2084)

* Fix example VB code

This VB code writen in a line is not compilable. `VBFromFilePublic` also requires a space.

* Fix example 4 VB code for all versions

* Remove the mentioning of version 2.0

* Adds missing SslProtocol parameter from Invoke-WebRequest cmdlet. (#2085)

* Add SslProtocol parameter.

* Add libcurl note to Certificate parameter.

* Import-Csv Update examples, and UseCulture (#2086)

* address example formatting
Also includes some update to wording that I'll expand on in PR.

* Start on update formatting for 3.0 doc

* More formatting

* Correcting examples and format of them.

* 3.0 update format example 1

* 3.0 update to example 2

* 3.0 update example 4

* 4.0 update example 1-4

* 5.0 update example 3 and 4

* 5.1 update example 4 paragraph format

* 3.0 update example 5

* 4.0 update example 5

* 5.0 update example 5

* 5.1 update example 5

* 5.1 update example 6

* 5.0 update example 6

* 4.0 update example 6

* 3.0 update example 6

* 3.0 update format of param Delimiter and Encoding

* 4.0 update format of param Delimiter and Encoding

* 5.0 update format of param Encoding

* 5.1 update format of param Encoding

* 5.0 update param header

* 4.0 update param header info

* 3.0 update param header info

* 5.1 update remaining parameter format

* 5.0 update remaining parameter format

* 4.0 update remaining parameter format

* 3.0 update remaining parameter format

* 3.0 update remaining parameter format

* 5.1 update notes format and add related link

* 5.0 update notes format and add related link

* 4.0 update notes format and add related link

* 3.0 update notes format and add related link

* update to example 1 across 3.0 to 5.1

* 6.0 Updates to description and example 1

* 4.0 update to example 1

* 3.0 - 5.1 update case of file name

* 6.0 update example 2 and 3

* 3.0 - 5.1 update case of file name

* 6.0 working on updating example 4
This example does not give same results I have on 6.0.1. Think other examples are going to be bad as well, have to go back and test those.

* update example 4

* update example 5

* 6.0 example 6 and parameter format

* addtional touchups on format

* Use a working URL in Clipboard examples (#2087)

* Fixed bad link in about_Hash_Tables.md docs (#2090)

Links to about_Object_Creation.md were malformed in all references versions.

* restoring changes made in PR#1870 (#2089)

* Remove repeat description (#2093)

* remove duplicate sentences (#2094)

* add escape \ for the delimiter (#2095)

* Fix typos in Invoke-WebRequest.md. (#2099)

* Small typo in Get-PfxCertificate.md fixed (#2101)

* Modify incorrect link (#2102)

There is no MacOS part in linux.md, now

* Update pull server documentation (#2097)

* improve clarity on pull service

* remove line at top of page

* add community references

* remove extra lines

* fixed line break in bolded text

This should remove the build warning.

* fix toc title (#2105)

* Merging changes to TOC into Staging (#2107)

* refactoring TOC (#2096)

* refactoring TOC

* fix typo in TOC

* adding redirects for deleted files (#2106)

* refactoring TOC

* fix typo in TOC

* adding redir for deleted files

* fix broken links

* Fix about_Switch.md. (#2109)

* fix about_Switch.md.

* Fix formatting.

* Fix Windows-PowerShell-Glossary.md. (#2110)

* Add info on POWERSHELL_TELEMETRY_OPTOUT environment variable. (#2111)

* Add details of where to look (#2112)

Add details of where to look for version information.

* Update Stop-Process.md (#2113)

Clean up unordered list formatting.

* Add ValidateDrive and ValidateUserDrive attributes information. (#2114)

* Update Installing-Windows-PowerShell.md (#2118)

PowerShell 6.0 has already been released.

* Update Add-Member.md (#2121)

Fixed Layout of Example 3

* fixing example 4 per Issue #2122

* Update Write-Debug.md (#2120)

* Added new line to powershell output

Added new line to clarify that the new line is a command vs output of previous command `$DebugPreference`

* Added newline break to clarify between PowerShell output and command

* fix typo (#2124)

fix typo of invoke-command session parameter

* Typo in Windows-PowerShell-Integrated-Scripting-Environment--ISE-.md (#2127)

Remove duplicated 'the'.

* Fixing issue 1585 - removing Information* parameters

* added missing H3 for -Name param

* Fixing issue 1434

* Fix issue 1434

* Minor typo fix in Format-List.md (#2129)

Checked "Accept wildcard characters" from "False" to "True" for "-Property". Example 4 clearly shows that this parameter accepts wildcards.

* Added missing bullet (#2133)

* Fixed empty bullet (#2132)

* fix broken yaml blocks in content

* Adds foreach & where method added in PowerShell v4 (#2139)

Adding details about foreach & where methods being added in PowerShell v4 and that they aren't available downlevel (for historical purposes) and also points to using the Pipeline methods with the resulting Foreach-Object & Where-Object cmdlets

* Missing y in Active Directory (#2137)

For copy and paste reasons (also it would now make a bit more sense)

* #5816 add message and msg alias to Write-Information and Write-Host (#2141)

* update links to published content

* removed "Windows" per zach

* Test-Connection Default Count value is 4 not None (#2171)

* Fix inconsistency in Test-Connection Count default

Currently the text description clearly describes the default functionality: four pings are sent.
The documentation for the Count's Default value stated that None was default which was false.

* Fix Test-Connection inconsistency for 5.0

Default value is 4, not None

* Fix Test-Connection inconsistency for 6.0

Default value is 4, not None

* Incorrect Whitespace (#2170)

- Incorrect whitespace

* Clarify the docs regarding libcurl for installation on openSUSE (#2169)

- Explicitly mention the conflict error and the solution.

- Make the command that looks for libcurl more precise, since the goal is to find the specific package that places the lib in the place where the RHEL PS package looks for it.

Ref: PowerShell/PowerShell#6184

* Update modulewithpseditionsupport.md (#2167)

typos corrected

* Adding DSC Extension history (#2175)

* Adding DSC Extension history

* Link and JSON cleanup

* Update docfx.json (#2176)

* Fixing breadcrumb configs and converting TOC to YAML (#2177)

* converted TOC to Yaml

* converting all TOC to yaml and fixing breadcrumb warning

* fixed breadcrumb for ref content

* fixing broken links

* Fix automation link and lint cleanup (#2180)

* Fix automation link and lint cleanup

* Fixed semantic lines

* Fixing links and various changes (#2181)

* Fixing links and various changes

* Requested changes and minor fixes

* Really fix the link this time

* Added notes on OnRemove event (#2174)

* Added notes on OnRemove event

* Update Remove-Module.md

* Update Remove-Module.md

* Update Remove-Module.md

* Update Remove-Module.md

* Close fenced code block (#2184)

Add "```" at the end to close the last fenced code block.

* Update azureDscexthistory.md (#2182)

Remove duplicated Version 2.19 section. Fix typos.

* Returning 2.19 to Latest Versions in History (#2185)

* Update authoringResourceMofDesigner.md (#2188)

* Fixed "about_Updatable_Help" link (#2186)

* Document 6.1.0 Web Cmdlets -Resume Feature (#2220)

* Update Invoke-RestMethod Syntax

* Add -Resume documentation to Invoke-RestMethod

* Update Syntax for Invoke-WebRequest

* Add -Resume documentation to Invoke-WebRequest

* Document New -Form Parameter for Web Cmdlets (#2233)

* Add example to Invoke-RestMethod

* Document -Form Feature in Invoke-RestMethod

* Add Simplified Mulitpart/Form-Data example to Invoke-WebRequest

* Document -Form Feature on Invoke-WebRequest

* Update docs with the info about session configurations created by Enable-PSRemoting cmdlet. (#2252)

* Document PowerShell/PowerShell#6018

* update documentation to reflect that -ConfigurationName can be used with SSH (#2318)

* update doc to reflect change in telemety opt out (#2316)

* Add -Not Feature to Where-Object (#2292)

Fix #2199

* Update docs for support of new hostname format (#2321)

* update remote cmdlets for new hostname syntax

* update Enter-PSSession as well

* update doc on new -workingdirectory parameter (#2320)

* Fix typo. (#2326)

* clarify that disconnect only works with WSMan (#2344)

* Web Cmdlets .NET Core 2.1 and PowerShell 6.1.0 Refresh (#2411)

* Update docs to reflect new -Subsystem parameter (#2339)

* update docs to reflect new -Subsystem for PSSession cmdlets

* address Paul's feedback

* update SSH remoting doc in regards to MFA (#2350)

* add instructions to install preview for macOS
addresses #2573

* change wording to match  other locations

* Modification for Measure-Object help file for -AllStats switch.

Modification for Measure-Object help file for -AllStats switch.

* update registration of MSFT repo using .deb pkg

* Replace Windows PowerShell with PowerShell
joeyaiello pushed a commit to MicrosoftDocs/PowerShell-Docs that referenced this pull request Sep 13, 2018
@joeyaiello joeyaiello removed Documentation Needed in this repo Documentation is needed in this repo labels Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior from Invoke-RestMethod from Windows Powershell to Powershell Core
5 participants