Commit Graph

4928 Commits

Author SHA1 Message Date
Steve Lee
df0162b90c put innerexception message as error detail rather than user getting generic error message (#3330) 2017-03-16 17:59:15 -07:00
Chunqing Chen
3f274aad9c make transcripts include the configuration name in the transcript header (#2890)
* PowerShell transcripts should include the configuration name in the transcript header
* adding test case for PowerShell transcripts should include the configuration name in the transcript header #2890
2017-03-15 22:06:07 -07:00
Steve Lee
76de340e79 corrected use of PSModulePath casing to be consistent with Windows PowerShell (#3255)
* corrected use of PSModulePath casing to be consistent with Windows PowerShell
addresses #3227

* addressing review feedback
make "PSModulePath" into const
fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in

* addressing review feedback
make "PSModulePath" into const
fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in
2017-03-15 12:04:28 -07:00
Steve Lee
e5da3516d9 fix default folders for opencover, output xml, and powershell exe path (#3308) 2017-03-15 11:55:34 -07:00
Travis Plunk
0fc4ef4c2e Add support for crossgen on OpenSUSE 13.2 (#3326) 2017-03-14 11:44:29 -07:00
Dongbo Wang
7f83c48ca5 Add support to ShellExecute in powershell core when it's running on Windows full SKUs (#3281)
* Add ShellExecute support to PowerShell core on windows full desktop
* Add tests for Start-Process and update existing related tests
2017-03-14 11:11:41 -07:00
Sergei Vorobev
438d8d9359 Add dummy GET parameter to nightly Travis CI badge (#3297) 2017-03-13 22:42:57 -07:00
Travis Plunk
02512fafe9 Fix typo in the instruction to install for OpenSUSE 13.2 (#3305) 2017-03-10 22:55:39 -08:00
Staffan Gustafsson
220eaa1ba7 Adding -Extension and -LeafBase switches to Split-Path (#2721)
* Refactoring ParsePathCommand.cs (SplitPathCommand) for readability
   - Using auto properties when no when there is no logic in getter/setter
   - Removing unused code
   - Removing redundant qualifiers
   - Removing Redundant initializers
* Add -Extension and -Leafbase switches to Split-Path cmdlet
   - Extension and LeafBase are specializations of Leaf, and uses System.IO.Path.GetExtension and System.IO.Path.GetFilenameWithoutExtension to extract parts from the Leaf
* Adding tests for Split-Path -LeafBase and Split-Path -Extension
2017-03-10 22:50:23 -08:00
Travis Plunk
63ba98fd25 Add openSUSE support in download.sh (#3306) 2017-03-10 16:54:47 -08:00
Travis Plunk
2409a2c7c8 Fix a test when the information object returns a FQDN (#3296) 2017-03-10 16:44:08 -08:00
Steve Lee
9c40d2987a Fix drifting of progress bar on Unix (#3289)
The progress bar was incorrectly setting the original x position which causes the progress to slowly move to the right in certain cases
2017-03-10 16:38:17 -08:00
Travis Plunk
c872ae705b Add OpenSUSE 13.2 release Dockerfile (#3303) 2017-03-10 16:36:33 -08:00
Dongbo Wang
3a960db5b0 Update docs for alpha.17 release (#3298) 2017-03-10 11:32:19 -08:00
Paul Higinbotham
7cea291475 Fix Invoke-Command remote debugging test failure in nightly build (#3294) 2017-03-09 20:14:26 -08:00
charub
d59627f9ae Fix New-LocalUser cmdlet to roll back user in case of user attributes assignment failure.
Resolving #3242

At this point, user account is created even if user attributes assignment
(like setting password) fails. The cmdlet throws a
non-terminating error but ends up creating the user. This behavior is
confusing. As per the changes, the localuser account will be rolled back
in case of failure in user attributes assignment.
2017-03-09 09:25:46 -08:00
Steve Lee
44bd923d22 Fix a test to use the targeted powershell rather than the system installed one (#3286) 2017-03-08 16:38:05 -08:00
Andrew
03b00e6522 Updated tags of automounted drives tests (#3290)
Two updates with this PR:
- reclassified automounted drives tests to be 'Feature' instead of 'CI' because this is more accurate;
- fixed failures in tests setup caused by "subst.exe" native utility having problems running as child process of powershell process tree run under "runas.exe /trustlevel:0x20000" (in Start-UnelevatedProcess in build.psm1).
2017-03-08 16:34:39 -08:00
Kevin Marquette
302b5200e0 Corect xUnit heading and other MD linting warnings (#3272) 2017-03-08 13:28:42 -08:00
Dongbo Wang
dd0fbd63a1 Fix $LinuxInfo to be a Hashtable instead of an array of Hashtable's. (#3276)
Get-Content /etc/os-release returns an array of strings, which get feeded to ConvertFrom-StringData. Therefore, $LinuxInfo is actually an array of Hashtable instances before this change. Property access on $LinuxInfo like $LinuxInfo.ID happens to work because powershell supports accessing a property or calling a method on a collection of object, but it's inefficient.
After this fix, $LinuxInfo will be a Hashtable, and it's efficient to access its members.
2017-03-07 16:23:18 -08:00
Travis Plunk
5d97bc558a update build.psm1 to support packaging for opensuse 13.2 (#3274) 2017-03-07 15:03:38 -08:00
Dongbo Wang
60583b1b73 Fix a CMS test that fails in nightly build.
Add a certificate that cannot be used to encrypt data to verify an error condition.
2017-03-07 13:39:15 -08:00
Ilya
6198b9b943 Rename "generated" files (#3275)
1. GetEvent_Types_Ps1Xml.generated.cs -> GetEvent_Types_Ps1Xml.cs
2. TypesV3_Ps1Xml.generated.cs -> TypesV3_Ps1Xml.cs
2017-03-07 12:51:28 -08:00
jeffbi
97be759cc7 Do not reject Windows' reserved device names on non-Windows platforms. (#3252) 2017-03-07 10:29:20 -08:00
Travis Plunk
e734d44199 Add OpenSUSE 13.2 build support (#3254) 2017-03-06 17:30:14 -08:00
Steve Lee
45be249be8 Update README.md to add the section of Community Dashboard (#3256) 2017-03-06 17:28:42 -08:00
Paul Higinbotham
ba62cf1ea2 Fixed typos that caused test to fail. (#3268) 2017-03-06 17:26:38 -08:00
Andrew
1d1cffd0c5 Auto-mounted file system drives correctly created when mounted inside a module (#3034)
Fixes #2442
2017-03-06 16:26:06 -08:00
Paul Allen
39c0f58b6e Update psrp client nuget for linux/mac
Adds ntml over spnego for authentication between windows and centos7.3
and ubuntu 16.04.
Fixes a number of problems that stopped connection to
exchange/office365.
2017-03-06 16:12:42 -08:00
Staffan Gustafsson
b4049879d4 Adding Parent extended property to System.Diagnostics.Process (#2850) 2017-03-06 15:21:39 -08:00
James Truher [MSFT]
c6bd000e6d Add additional tests for Clear-Content to improve coverage (#3157)
Coverage has improved to more than 85% for Clear-Content
2017-03-06 13:57:09 -08:00
Kevin Marquette
f29b99ec6a Add PassThru support to Start-PSPester (#3205) 2017-03-06 13:13:34 -08:00
Lee303
b043b444db adds parameter sets to web cmdlets to allow for standard and non-stan… (#3142)
* adds parameter sets to web cmdlets to allow for standard and non-standard method verbs

* add CoreCLI implementation

* Adds CM alias and notnullempty for CustomMethod parameter

* Add tests for Invoke-[WebRequest|RestMethod] CustomMethod parameter

* Fix webcmdlet tests - incorrect parameter name
2017-03-06 11:41:14 -08:00
Keith Hill
4a0afd85cb Update VSCode install/debug instructions. (#3262) 2017-03-06 09:19:25 -08:00
Steve Lee
a2687bfb59 Allow profile directory creation failures for Service Account scenarios (#3244)
XDG profile directory creation can fail for accounts that do not have home directories.

The module analysis was trying to persist it's cache in an XDG profile directory.
The cache is less critical than it once was, so it's reasonable to not cache if there is no good place to do so.

Fixes #3011
2017-03-05 22:05:10 -08:00
Nicholas Willard
df0a390c2c Update Copyright notice to remove year (#3204) 2017-03-04 23:47:14 -08:00
Steve Lee
402ffeceb1 Update issue-management.md (#3253) 2017-03-04 22:51:21 -08:00
probonopd
669a34a27b Do not download from external sources (#3211)
This commit removes the external dependencies of the AppImage generation script by instead
downloading them from a known (and owned by Microsoft) location:
psgithub.file.core.windows.net.
2017-03-03 10:37:16 -08:00
Kyle Sferrazza
ca874e966b Add Arch Linux installation information (#3215) 2017-03-01 17:38:24 -08:00
PetSerAl
c490e36a58 Remove System.Array type data (#3231)
* Rename Types_Ps1Xml.generated.cs
* Remove <auto-generated> header from Types_Ps1Xml.cs
* Remove System.Array type data
* Update `Get-TypeData` tests
2017-03-01 12:58:03 -08:00
Dongbo Wang
fc30ae1d87 Port CmsMessage cmdlets and Get-PfxCertificate to powershell core (#3224) 2017-03-01 10:51:19 -08:00
Steve Lee
99d696f31f Fix Test-Modulemanifest to normalize paths correctly before validating (#3097)
Changed hard coded Windows directory separator and resolved path so the slashes are correct.
Throw if resolving file path returns more than one result

Fixes #2610
2017-03-01 10:36:02 -08:00
Paul Higinbotham
b4cb5e95a2 Implementation for Invoke-Command step-in remote debugging (#3015)
These changes provide the ability to debug remote running scripts started with the Invoke-Command cmdlet. The design is event based and provides new public events that allow subscribers to be notified when an Invoke-Command remote session is ready for debugging. Since Invoke-Command allows running scripts on multiple targets at once (fan-out) the notification event is raised for each remote session as it becomes ready for debugging. The subscriber to these events will be a script debugger implementation (such as PowerShell console, ISE, or VSCode) and will handle all debugging details such as simultaneously debugging multiple remote sessions at once in separate windows.

But these changes also include an internal implementation which is used by default if host debuggers don't want to handle the debugging details. This internal implementation is what PowerShell console, ISE uses so they can have this new behavior without having to modify their debugger implementations. The internal implementation serializes each remote session of Invoke-Command so that they can be debugged one at a time. The remote session debugger is "pushed" onto the internal debugger stack so that debugging transitions to the remote session. Existing debugging commands work so that the "quit" debugging command will stop the current remote session script from running and allow the next remote session to be debugged. Similarly the "continue" debugging command allows the script to continue running outside step mode and again go to the next remote session for debugging. The "stepout" debugging command steps out of all Invoke-Command remote sessions and lets the script continue to run for each remote session in parallel as they are normally run.

The purpose of Invoke-Command step-in remote debugging is allow seamless debugging of a local script that calls Invoke-Command on remote targets. But there is also a new Invoke-Command "-RemoteDebug" parameter that lets you Invoke-Command on the command line and have it drop directly into the debugger.

An example from the PowerShell command line looks like this:
```
PS C:\> C:\TestICM.ps1
Entering debug mode. Use h or ? for help.

Hit Command breakpoint on 'Invoke-Command'

At C:\TestICM.ps1:2 char:1
+ Invoke-Command -cn $computerName,paulhig-3 -File c:\LinuxScript.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[DBG]: PS C:\>> list

    1:  $computerName = "localhost"
    2:* Invoke-Command -cn $computerName,paulhig-3 -File c:\LinuxScript.ps1
    3:  "Test Complete!"

[DBG]: PS C:\>> stepin
At line:1 char:1
+ Write-Output "Running script on Linux!"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[paulhig-3]:[DBG]: [Process:14072]: [Runspace5]: PS C:\Users\paulhi\Documents>
```

Notice that the debugger "stepin" command transitioned from local script debugging to debugging the remote session on computer "paulhig-3", as can be seen by the change in the debugger prompt.

You can also do this from the command line to drop directly into the debugger
```
Invoke-Command -cn localhost -Script  $scriptblock -RemoteDebug
```

These changes also remove an old behavior that was incompatible with this new step-in feature. Previously if a remote session running script hit a break point it would stop in the debugger and go to the "disconnected session" state. This was to allow the user to reconnect using Enter-PSSession and then interactively debug the remote session script. This behavior has been removed and now the user needs to attach a debugger using the newer Debug-Runspace cmdlet.
2017-03-01 10:28:25 -08:00
Raghu Shantha [MSFT]
875ea100e3 Updated docker release images to pull powershell package from Microsoft Repo (#3219) 2017-02-28 17:17:04 -08:00
Paul Higinbotham
136213d6b4 Fix for race bug in WSMan command plugin instance close operation (#3203) 2017-02-27 15:15:58 -08:00
Jason Shirk
8cf7989b53 Change NestedModule to NestedModules in error message (#3214) 2017-02-27 15:11:12 -08:00
PetSerAl
ae37a9fafe Fix powershell to not crash on converting recursive array to bool (#3208) 2017-02-27 10:54:07 -08:00
Staffan Gustafsson
e3b59e0f51 Moving Import-PowerShellDatafile from script to cmdlet (#2750) 2017-02-26 16:50:28 -08:00
Steve Lee
c74b2a7670 return HTTP response for error status as part of exception (#3201) 2017-02-24 22:29:11 -08:00
Dongbo Wang
21c8a90cc1 Update a comment in Credential.cs to make it accurate (#3194) 2017-02-24 16:55:50 -08:00