Skip to content

Commit 4183c27

Browse files
committed
Revert to old change
1 parent 2860da7 commit 4183c27

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

extensions/powershell/convertDscResource.psm1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ function ConvertTo-DscObject
9898
$Tokens = $null
9999
$ParseErrors = $null
100100

101-
Get-ChildItem "C:\Windows\System32\WindowsPowerShell\v1.0\Modules" | Select-Object Name | Write-DscTrace -Operation Trace
102101
# Load the PSDesiredStateConfiguration module
103-
Import-Module -Name 'PSDesiredStateConfiguration' -RequiredVersion '1.1' -Force -ErrorAction stop -ErrorVariable $importModuleError
102+
Import-Module -Name 'PSDesiredStateConfiguration' -RequiredVersion 1.1 -UseWindowsPowerShell -WarningAction SilentlyContinue -ErrorVariable $importModuleError
104103
if (-not [string]::IsNullOrEmpty($importModuleError)) {
105104
'Could not import PSDesiredStateConfiguration 1.1 in Windows PowerShell. ' + $importModuleError | Write-DscTrace -Operation Error
106105
exit 1

0 commit comments

Comments
 (0)