Skip to content

Commit 526ca6c

Browse files
committed
Output available modules
1 parent d9ccec4 commit 526ca6c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

extensions/powershell/win_powershell.tests.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ Describe 'PowerShell extension tests' {
1313
It 'Example PowerShell file should work' -Skip:(!$IsWindows -or !$isElevated) {
1414
Write-Verbose -Message $env:PSModulePath -Verbose
1515

16-
$names = Get-ChildItem "$env:SystemRoot\System32\WindowsPowerShell\v1.0\Modules" | ForEach-Object {Write-Verbose "Found module: $($_.Name)"} -Verbose
17-
16+
$names = Get-ChildItem "$env:SystemRoot\System32\WindowsPowerShell\v1.0\Modules"
17+
foreach ($name in $names) {
18+
Write-Verbose -Message "Found module: $($name.Name)" -Verbose
19+
}
20+
1821
$psFile = Resolve-Path -Path "$PSScriptRoot\..\..\dsc\examples\variable.dsc.ps1"
1922
$out = dsc -l trace config get -f $psFile 2>$TestDrive/error.log | ConvertFrom-Json
2023
$LASTEXITCODE | Should -Be 0 -Because (Get-Content -Path $TestDrive/error.log -Raw | Out-String)

0 commit comments

Comments
 (0)