File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ if ($Script:IsPowerShellCore)
9
9
Import-Module - Name ' PSDesiredStateConfiguration' - MinimumVersion 2.0 .7 - Prefix ' Pwsh'
10
10
}
11
11
12
+ $VerbosePreference = ' Continue'
13
+
12
14
function Write-DscTrace {
13
15
param (
14
16
[Parameter (Mandatory = $false )]
@@ -109,15 +111,6 @@ function ConvertTo-DscObject
109
111
$Tokens = $null
110
112
$ParseErrors = $null
111
113
112
- (Get-Module - Name ' PSDesiredStateConfiguration' - ListAvailable | ConvertTo-Json ) | Write-DscTrace Debug
113
-
114
- # # Load the PSDesiredStateConfiguration module
115
- # Import-Module -Name 'PSDesiredStateConfiguration' -RequiredVersion '1.1' -Force -ErrorAction stop -ErrorVariable $importModuleError
116
- # if (-not [string]::IsNullOrEmpty($importModuleError)) {
117
- # 'Could not import PSDesiredStateConfiguration 1.1 in Windows PowerShell. ' + $importModuleError | Write-DscTrace -Operation Error
118
- # exit 1
119
- # }
120
-
121
114
# Remove the module version information.
122
115
$start = $Content.ToLower ().IndexOf(' import-dscresource' )
123
116
if ($start -ge 0 )
@@ -209,6 +202,7 @@ function ConvertTo-DscObject
209
202
}
210
203
else
211
204
{
205
+ Write-Verbose - Message " Loading DSC resources from module '$ ( $moduleToLoad.ModuleName ) '" - Verbose
212
206
$currentResources = Get-DSCResource - Module $moduleToLoad.ModuleName
213
207
}
214
208
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ BeforeDiscovery {
33
33
Describe ' PowerShell extension tests' {
34
34
It ' Example PowerShell file should work' - Skip:(! $IsWindows -or ! $isElevated ) {
35
35
Write-Verbose - Message $env: PSModulePath - Verbose
36
-
37
- $names = Get-ChildItem " $env: SystemRoot \System32\WindowsPowerShell\v1.0\Modules"
38
- foreach ($name in $names ) {
39
- Write-Verbose - Message " Found module: $ ( $name.Name ) " - Verbose
40
- }
41
36
42
37
$psFile = Resolve-Path - Path " $PSScriptRoot \..\..\dsc\examples\variable.dsc.ps1"
43
38
$out = dsc - l trace config get -f $psFile 2> $TestDrive / error.log | ConvertFrom-Json
You can’t perform that action at this time.
0 commit comments