Skip to content

Commit 2e10128

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
Change order for winps-adapter to prefer Windows modules first
1 parent a42e0d9 commit 2e10128

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell-adapter/psDscAdapter/win_psDscAdapter.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if ($PSVersionTable.PSVersion.Major -gt 5) {
2525
$PSDesiredStateConfiguration = Import-Module $m -Force -PassThru
2626
}
2727
else {
28-
$env:PSModulePath += ";$env:windir\System32\WindowsPowerShell\v1.0\Modules"
28+
$env:PSModulePath = "$env:windir\System32\WindowsPowerShell\v1.0\Modules;$env:PSModulePath"
2929
$PSDesiredStateConfiguration = Import-Module -Name 'PSDesiredStateConfiguration' -RequiredVersion '1.1' -Force -PassThru -ErrorAction stop -ErrorVariable $importModuleError
3030
if (-not [string]::IsNullOrEmpty($importModuleError)) {
3131
'Could not import PSDesiredStateConfiguration 1.1 in Windows PowerShell. ' + $importModuleError | Write-DscTrace -Operation Error

0 commit comments

Comments
 (0)