Skip to content

Commit bf68df8

Browse files
pkotov87Paul Kotov
authored andcommitted
pkotov87 - change System.Environment]::SetEnvironmentVariable() to Set-ItemProperty
1 parent b455ce5 commit bf68df8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Try {
66
} Finally {
77
If (![string]::IsNullOrEmpty($UnmungedPSModulePath)) {
88
# Reset the PSModulePath
9-
#[System.Environment]::SetEnvironmentVariable('PSModulePath', $UnmungedPSModulePath, [System.EnvironmentVariableTarget]::Machine) #commented becose of long execution time
109
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name 'PSModulePath' -Value $UnmungedPSModulePath
1110
$env:PSModulePath = [System.Environment]::GetEnvironmentVariable('PSModulePath', 'machine')
1211
}

0 commit comments

Comments
 (0)