Commit graph

5232 commits

Author SHA1 Message Date
SteveL-MSFT 48625af83e added check to device guard not returning array 2017-07-28 11:28:02 -07:00
Ilya b61f21562b Cleanup '#if CORE' in ManagedEntrance.cs (#4373) 2017-07-28 11:25:08 -07:00
SteveL-MSFT d78e9ba19b [Feature]
In CI, notepad.exe isn't starting (or starting in time) when using start-process with .txt based on file association.
Since the test is validating opening files by association, fix is to create our own association that is predictable.
2017-07-28 10:58:12 -07:00
Steve Lee 03d4e9120b Support Invoke-Item -Path <folder> (#4262)
On CoreFx, UseShellExecute for Process start is false by default to be cross platform compatible.
In the case of a folder, Process.Start() returns Access Denied as it's not an executable.
On Windows, we can use the ShellExecute path to have explorer open the folder. On Unix, we use `xdg-open` and `open` for Linux and macOS respectively.
2017-07-27 22:17:38 -07:00
SteveL-MSFT 700a1c41ff [Feature]
fix Get-ComputerInfo return of status for DeviceGuard
fix corresponding tests
2017-07-26 15:08:24 -07:00
Steve Lee cf7b9f3de1 Fix Implicit Remoting test failure on nightly run (#4323)
Retry setting winrm config if it fails with MaxConcurrentUsers > 100
2017-07-26 10:08:52 -07:00
Steve Lee 0cd7a4a0c9 Fix error message when 'HelpMessage' property of 'ParameterAttribute' is set to empty string (#4334)
- Fix invalid value error message on some properties of ParameterAttribute to point to the specific properties.
- Avoid wrapping argument exception into not a useful 'requires' exception.
2017-07-26 09:20:43 -07:00
Travis Plunk 1c42ed253a Move packaging strings to .psd1 file (#4333)
Move here strings in packaging module to psd1 file for easier maintenance of strings and code.
2017-07-26 08:49:56 -07:00
Travis Plunk f3dd2f0414 Merge pull request #3608 from DarwinJS/feature/install-powershell.sh
create script to install latest powershell from repositories
2017-07-25 18:48:20 -07:00
Travis Plunk 56be2ae8a0 Start using vs 2017 image (#4340) 2017-07-25 17:56:15 -07:00
Travis Plunk e4dc938732 Get macOS working and fix misc issue 2017-07-25 17:55:42 -07:00
Dongbo Wang b0efc7c2c2 Separate Windows PSRP binary build out of Start-PSBuild (#4335)
There are following major changes:
- `Start-PSBootstrap -BuildWindowsNative` installs the native dependencies required for building PSRP binary. Without `-BuildWindowsNative`, it only installs the dotnet-SDK on Windows platform.
- `Start-PSBuild` doesn't build Windows PSRP binary. Instead, `Start-BuildNativeWindowsBinaries` is added to build it. After the build, 3 files (`'pwrshplugin.dll'`, `'pwrshplugin.pdb'`, `'Install-PowerShellRemoting.ps1'`) will be bin-placed at `src\powershell-win-core` like before.
- The NuGet package `'psrp.windows'` is added to `powershell-core` feed, and we reference it in `powershell-win-core.csproj` to get the Windows PSRP related files. Files (.dll and .pdb) in the package are from the beta.4 release build.
2017-07-25 16:50:27 -07:00
Dongbo Wang 0d8eff6446 Fix array expression to not return null or throw error (#4296)
This change fixes 3 issues:
- According to [PowerShell Language Specification Version 3.0](https://www.microsoft.com/en-us/download/details.aspx?id=36389), as quoted: "_The result is the (possibly empty) unconstrained 1-dimensional array_", `@(...)` should only return `object[]` array.
- `@([object[]]$null).GetType()` fails with error `"You cannot call a method on a null-valued expression."`
- `@([System.Collections.Generic.List[object]]$null)` fails with error `"Object reference not set to an instance of an object."`
2017-07-24 21:52:30 -07:00
Travis Plunk d24d1634ba Remove unneeded try-catch in build.psm1 (#4328) 2017-07-24 15:26:04 -07:00
Dongbo Wang 905e6978e6 [Feature]Fix regressions that cause implicit remoting tests to fail (#4326) 2017-07-24 08:17:41 -07:00
Travis Plunk 76e184b0ba move packaging CmdLets to separate module (#4319)
* fix PsScriptAnalyzer issues
* update release docs
2017-07-23 12:29:33 -07:00
Travis Plunk 0f34324570 Fix PRs not running Feature (#4304) 2017-07-22 15:34:03 -07:00
Steve Lee c145866821 Update doc about the process to become a Maintainer (#4311) 2017-07-21 21:10:15 -07:00
bergmeister ffd39b2853 PSScriptAnalyzer fixes by category (#4261)
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select')
- Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison.
- A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison
- Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null'
2017-07-21 21:03:49 -07:00
Steve Lee e23d2e53d5 Add Test coverage for XmlCommand.cs (#4201) 2017-07-21 13:50:14 -07:00
DarwinJS fdabe86880 trying apostrophes
rename md to have only one period
fix md spelling mistakes
Fixes to markdown to follow strict syntax
create readme
2017-07-21 10:59:16 -07:00
DarwinJS c31f274767 install-powershell.sh
updating for pull request comments
OSX Install script updated to use repositories

Using TR, use curl rather than wget since we ensured it is on the system
Update comments in install-powershell.sh
install-powershell.sh
2017-07-21 10:59:16 -07:00
James Truher [MSFT] 4df979a475 Create symlinks in publish path for RedHat variants (#4198) 2017-07-20 09:42:34 -07:00
Travis Plunk f1ff79011d Due to the use of unsupported APIs, we must remove the LocalAccounts module until a better solution is found. (#4302) 2017-07-19 17:20:35 -07:00
Travis Plunk 72a8de39b5 Due to the use of unsupported APIs, we must remove the Counter CmdLets in the Diagnostics Module until a better solution is found. (#4303) 2017-07-19 17:20:01 -07:00
Travis Plunk 8c7f703f82 Add tests to do basic verification of docker images (#4244) 2017-07-19 16:48:54 -07:00
Travis Plunk 3b3b3d1b70 Fix build message getting truncated on rerun (#4297) 2017-07-19 16:47:11 -07:00
Travis Plunk 9571f8f2f4 Add ability to run feature tests for pr (#4277) 2017-07-19 10:33:58 -07:00
Dongbo Wang d6265c303b Add test to validate 'Assembly.LoadFrom' behavior (#4285) 2017-07-18 22:10:59 -07:00
Matt Wrock 238ce9d97e if running noninteractively then do not break into debugger on ctrl + break
Signed-off-by: Matt Wrock <matt@mattwrock.com>
2017-07-18 14:32:34 -07:00
Steve Lee 76413addac Run CI and Feature tests by default with Start-PSPester (#4273) 2017-07-18 14:20:14 -07:00
Mike Richmond 4f13bf476e Fix ConvertTo-Html single matched column header bug (#4276) 2017-07-18 14:13:54 -07:00
Steve Lee b70460fb93 updated webcmdlets CI tests to not depend on external website (#4279)
* updated webcmdlets CI tests to not depend on external website

* When used in background runspace, validate listener is working before returning

* fix possible infinite loop waiting for listener to start
2017-07-18 12:33:40 -07:00
Travis Plunk 73b3b0895c Use cached 'dotnet' in AppVeyor (#4278) 2017-07-18 11:39:04 -07:00
Steve Lee 44e377525b Register-PSSessionConfiguration fails if SesionConfig folder doesn't exist (#4271) 2017-07-18 10:07:05 -07:00
Kirk Munro 011271ca25 Add Build Check for MFC for Visual C++ During Windows Builds (#4185)
* added requirement check for atlbase.h

* removed blank line mistakenly added

* updated based on pull request feedback
2017-07-17 11:47:11 -07:00
Dongbo Wang 069c7a4b6f Enable DataRow/DataRowView adapters in PowerShell Core (#4258) 2017-07-17 11:27:01 -07:00
Steve Lee 06274095ea Enable upgrades rather than side-by-side install (#4259) 2017-07-17 11:12:36 -07:00
James Truher [MSFT] 71392a2666 Disable UTC and SQM telemetry by enclosing the code in '#if LEGACYTELEMETRY' (#4190) 2017-07-17 09:44:54 -07:00
bergmeister f95fbf144e Checkbox to open PowerShell after the (Windows) installer has finished (#4203)
Added a checkbox (unchecked by default) to the last dialogue of the Windows installer to provide the option of opening PowerShell because that's what most people want to do if they installed PowerShell.
2017-07-14 18:10:35 -07:00
Dongbo Wang c5f3a19caf Run PowerShell class static methods in the correct Runspace/SessionState (#4209)
Summary
----------
When the same script file gets executed in multiple Runspaces, the RuntimeType generated from the powershell class defined in the file will be shared among those Runspaces. For different Runspaces, different SessionState should be used to run the static methods.

Fix
---
We use the `SessionStateKeeper` to query for the correct `SessionState` to use for a static method call.
We already use `SessionStateKeeper` to track the `Runspace/SessionState` where a PowerShell class is defined, and thus we can leverage this for the static method invocation.
2017-07-14 18:05:48 -07:00
Joey Aiello 63ef3245c9 Beta.4 changelog updates (#4260) 2017-07-14 17:31:14 -07:00
Ilya 23c9b934ef Fix C# tests for ValidateSetValuesGenerator (#4253) 2017-07-14 13:02:58 -07:00
Paul Higinbotham 7fa0dd0549 Fix for implicit remote regression in restricted session (#4222) 2017-07-14 12:28:22 -07:00
Dan Travison ea758a53af Add -SkipHeaderValidation switch to Invoke-WebRequest and Invoke-RestMethod to support adding headers without validating the header value. (#4085)
* Add -SkipHeaderValidation switch to Invoke-WebRequest and Invoke-RestMethod to support adding headers without validating the header value.

* Fix whitespace
2017-07-14 10:24:20 -07:00
Travis Plunk 7442e77073 update nanoserver-insider-powershell known issues (#4251)
* update nanoserver-insider-powershell known issues

* Add new words to dictionary

* address PR comments
2017-07-14 10:16:39 -07:00
David Christian e333ac3ab9 Added tests for built-in type accelerators (#4230) 2017-07-14 09:53:28 -07:00
Paul Higinbotham 02737e2fe4 Fixes CIM deserialization bug (#4234) 2017-07-14 09:52:24 -07:00
Ilya dc76c86f7a ValidateSetAttribute enhancement: support set values to be dynamically generated from a custom ValidateSetValueGenerator (#3784)
Currently `ValidateSetAttribute` accepts only explicit constants as valid values. This is a significant limitation. Sometimes we need to get valid values dynamically, ex., Azure VMs, logged-on users and so on. The PR add follow possibilities:
- pass a _custom type_ (a valid values generator) implementing `IValidateSetValuesGenerator` interface to get valid values dynamically.
- pass a _custom type_ (a valid values generator) derived from `CachedValidValuesGeneratorBase` abstract class to get valid values dynamically and _cache_ the list to share with other ValidateSetAttribute attributes.
2017-07-13 21:28:32 -07:00
Travis Plunk 67266f6aa0 Move Bootstrap to 'install' phase for Travis-CI (#4250) 2017-07-13 21:21:32 -07:00