Commit Graph
156 Commits
Author SHA1 Message Date
Steve Lee 9ae18ab0d1 Change exec from alias to function to handle arbitrary arguments (#18567) 2022-11-17 12:14:27 -08:00
Steve Lee 0ddf89e5a8 Fix Switch-Process to copy the current env to the new process (#18452) 2022-11-07 11:03:37 -08:00
Steve Lee 52a62e9ef2 Fix Switch-Process error to include the command that is not found (#18443) 2022-11-03 07:54:11 +05:00
James Truher [MSFT] 074aad6ea9 Add missing -Tag 'CI' to describe blocks. (#18316) 2022-10-17 15:27:24 -07:00
Steve Lee 944ed5413d Revert "Add -StrictMode to Invoke-Command to allow specifying strict mode when invoking command locally" (#18040) 2022-09-12 11:41:57 -07:00
Steve Lee 918bb8c952 Make experimental feature PSExec stable (#18045) 2022-09-07 10:28:17 -07:00
Travis Plunk 96d0a10e7f Remove unneeded use of chmod 777 (#17974)
* Update Pester.Commands.Cmdlets.GetCommand.Tests.ps1

* Update Export-Alias.Tests.ps1

* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1

* Update test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1

* Update test/powershell/Modules/Microsoft.PowerShell.Core/Pester.Commands.Cmdlets.GetCommand.Tests.ps1
2022-08-29 11:06:46 -07:00
James Truher [MSFT] b3632eda46 Improve unique naming for tests (#17043) 2022-03-23 09:24:10 -07:00
Dongbo Wang 9b2d97e3e2 Update a few tests to make them more stable in CI (#16944) 2022-03-02 17:39:30 -08:00
ayousuf23 31c14f2ad3 Updated background invocation & operator to use -WorkingDirectory when starting a new job (#16180) 2022-02-21 10:02:30 -08:00
Dongbo Wang 30eac0a11e Update to use windows-latest as the build agent image (#16831) 2022-02-07 17:34:52 -08:00
Thomas-Yu ed6e0588c8 Add -StrictMode to Invoke-Command to allow specifying strict mode when invoking command locally (#16545) 2022-01-12 11:17:02 -08:00
Dongbo Wang cce64f49de Report error when PowerShell built-in modules are missing (#16628) 2022-01-12 10:02:03 -08:00
Steve Lee a9b14a13fd Add exec cmdlet for bash compatibility (#16462) 2022-01-04 14:09:27 -08:00
Andrew Menagarishvili 3f1c03d494 Merged PR 18449: Change default for $PSStyle.OutputRendering to Ansi
Cherry picked from !18333

Cherry-picked from commit `5cb8a2b3`.
2021-12-16 13:39:56 -08:00
Paul Higinbotham 64d2fe26f3 Fix PSVersion parameter version checks and error messages for PowerShell 7 remoting (#16228) 2021-12-01 15:54:25 -08:00
Joel Sallow (/u/ta11ow) fde119e28b Use CurrentCulture when handling conversions to DateTime in Add-History (#16005) 2021-08-26 21:41:01 -07:00
Mariano Alipi ae5a84ea05 Move misplaced test file to tests directory (#14908) 2021-03-08 23:51:38 +05:00
Steve Lee 6d7fbed02b Suppress Write-Progress in ConsoleHost if output is redirected and fix tests (#14716) 2021-02-08 09:42:53 -08:00
Christopher Yeleighton 8626937ac4 Change "operable" to "executable" (#13281)
* Change "operable" to "executable" in a resource string
2020-08-06 13:02:43 +05:00
Dongbo Wang f6f966b3dc Fix Invoke-Command to detect recursive call of the same history entry (#13197) 2020-07-23 09:11:25 -07:00
Aditya PatwardhanandAditya Patwardhan 808bf22d2f Ensure assemblies listed FileList are not loaded (#12968)
Co-authored-by: Aditya Patwardhan <Aditya Patwardhan>
2020-06-30 10:16:13 -07:00
xtqqczze f4382202ae Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584) 2020-05-07 17:00:30 +05:00
Andrew 0c695376b7 Fix WinCompat module loading to treat Core edition modules higher priority (#12269) 2020-04-16 16:57:55 -07:00
Andrew 14487bf85d Make GetWindowsPowerShellModulePath compatible with multiple PS installations (#12280)
Add additional check for each component of PSModulePath (that is set for WinPS process) - if it is has pwsh.exe in the parent directory, then it is considered another PS Core installation and this location is also filtered out.
2020-04-14 11:08:01 +05:00
Paul Higinbotham 668d72c4af Clean up the IPC named pipe on PowerShell exit (#12187) 2020-03-26 09:47:33 -07:00
Steve Lee b7cb335f03 Update copyright notice to latest guidance (#12190) 2020-03-24 11:08:37 -07:00
Ilya 12bf5f4a0c Bring back MainWindowTitle in PSHostProcessInfo (#11885)
* Bring back MainWindowTitle in PSHostProcessInfo

* Add test
2020-03-10 09:30:53 -07:00
Andrew 704b0e74ed Miscellaneous minor updates to WinCompat (#11980)
* Filter PSModulePath when starting PS 5.1. Removing PS-Core-specific paths from PSModulePath of WinCompat process (Windows PS).
* Make implicit WinCompat respect NoClobber and Scope parameters
* Add ErrorAction.Ignore when searching for WinPSCompatSession
2020-03-10 11:31:44 +05:00
Andrew d2cb3c3636 Sync current directory in WinCompat remote session (#11809) 2020-02-11 11:44:30 -08:00
Andrew 43c88a4ff1 Add WinCompat deny list support using a setting in powershell.… (#11726) 2020-02-04 16:33:26 -08:00
Tyler James Leonhardt 6911aa3794 Check state and report reason if it's not "opened" (#11574) 2020-01-30 14:42:51 -08:00
xtqqczze 920b671fb4 Unify pester test syntax for the arguments of -BeOfType (#11558) 2020-01-24 11:00:37 -08:00
Paul Higinbotham a7a2b12336 Fix for JEA user role in virtual account (#11668) 2020-01-24 09:54:07 -08:00
Ilya aefb82a308 Correct casing for automatic variables (#11568)
* Remove BOM, insert newline at EOF

* Correct case of $MyInvocation special variable

* Correct case of $OFS special variable

* Correct case of $NestedPromptLevel special variable

* Correct case of $Matches special variable

* Correct case of $LASTEXITCODE special variable

* Correct case of $StackTrace special variable

* Correct case of $args special variable

* Correct case of $this special variable

* Correct case of $input special variable

* Correct case of $PSCmdlet special variable

* Correct case of $error special variable

* Correct case of $PSDefaultParameterValues special variable

* Correct case of $PSScriptRoot special variable

* Correct case of $PWD special variable

* Correct case of $null special variable

* Correct case of $true special variable

* Correct case of $false special variable

* Correct case of $PSModuleAutoLoadingPreference special variable

* Correct case of $IsLinux special variable

* Correct case of $IsMacOS special variable

* Correct case of $IsWindows special variable

* Correct case of $IsCoreCLR special variable

* Correct case of $DebugPreference special variable

* Correct case of $VerbosePreference special variable

* Correct case of $InformationPreference special variable

* Correct case of $ExecutionContext special variable

* Correct case of $HOME special variable

* Correct case of $Host special variable

* Correct case of $PID special variable

* Correct case of $PSCulture special variable

* Correct case of $PSHOME special variable

* Correct case of $PSUICulture special variable

* Correct case of $PSVersionTable special variable

* Fix false positives
2020-01-14 21:39:30 +05:00
Andrew 1cb5f8e943 Mark System32-PSModulePath test as pending (#11576) 2020-01-14 08:39:02 -08:00
xtqqczze 090ad9cb33 Correct case of $PSVersionTable special variable 2020-01-13 19:36:31 +00:00
xtqqczze e0d2e2aade Correct case of $PSHOME special variable 2020-01-13 19:35:33 +00:00
xtqqczze 225164037f Correct case of $PID special variable 2020-01-13 19:34:38 +00:00
xtqqczze 7cb8dc48ea Correct case of $HOME special variable 2020-01-13 19:33:43 +00:00
xtqqczze b700c4631b Correct case of $InformationPreference special variable 2020-01-13 19:31:24 +00:00
xtqqczze ca4edaddd6 Correct case of $VerbosePreference special variable 2020-01-13 19:29:33 +00:00
xtqqczze 6affae574c Correct case of $DebugPreference special variable 2020-01-13 19:28:14 +00:00
xtqqczze 9e5bb4eee7 Correct case of $PSModuleAutoLoadingPreference special variable 2020-01-13 19:26:01 +00:00
xtqqczze 4a9d70fdcd Correct case of $PWD special variable 2020-01-13 19:24:10 +00:00
xtqqczze b6a687bf21 Correct case of $error special variable 2020-01-13 19:19:39 +00:00
xtqqczze 89e33f5772 Correct case of $Matches special variable 2020-01-13 19:15:17 +00:00
xtqqczze 743983390e Update pester syntax to v4 (#11544)
* Capitalize 'Should' command and fix whitespace

```powershell
$_ -ireplace '\s?\|\s?should\b',' | Should'
```

* Capitalise and apply hyphen to 'Not' parameter

```powershell
$_ -ireplace '(\| Should) not\b','$1 -Not'
```

* Capitalise and apply hyphen to 'Be' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?) -?be\b','$1 -Be'
```

* Capitalise and apply hyphen to 'BeExactly' parameter

$_ -ireplace '(\| Should(?: -Not)?) -?beexactly\b','$1 -BeExactly'

* Capitalise and apply hyphen to 'BeGreaterThan' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?) -?begreaterthan\b','$1 -BeGreaterThan'
```

* Use 'BeTrue' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?) -Be\s\$?true\b','$1 -BeTrue'
```

* Use 'BeFalse' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?) -Be\s\$?false\b','$1 -BeFalse'
```

* Capitalise and apply hyphen to 'Match' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?)\s-?match\b','$1 -Match'
```

* Capitalise and apply hyphen to 'Throw' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?)\s-?throw\b','$1 -Throw'
```

* Capitalise and apply hyphen to 'BeNullOrEmpty' parameter

```powershell
$_ -ireplace '(\| Should(?: -Not)?)\s-?benullorempty\b','$1 -BeNullOrEmpty'
```

* Capitalise 'Because' parameter

```powershell
$_ -ireplace '\s-because\b',' -Because'
```

* Fix 'BeNullOrEmpty'
2020-01-11 20:41:59 +05:00
Paul Higinbotham b19e2b9d4c Various test fixes for debugger and remoting (#11528) 2020-01-08 16:23:38 -08:00
Ilya 99cf9fd859 Re-balance CI tests (#11420) 2020-01-05 13:01:42 +05:00