Skip to content

Commit 2685c4f

Browse files
authored
Merge pull request #2540 from microsoft/dpaul-EOMTFix
Fix HKU PSDrive creation failing under -WhatIf in EOMT
2 parents 38224a7 + 378a3e1 commit 2685c4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Security/src/EOMT/SharedFunctions/Install-IISUrlRewriteModule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function Install-IISUrlRewriteModule {
6464
"HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
6565
)
6666

67-
New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS -ErrorAction SilentlyContinue | Out-Null
67+
New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS -WhatIf:$false -ErrorAction SilentlyContinue | Out-Null
6868

6969
$UninstallKeys += Get-ChildItem HKU: | Where-Object { $_.Name -match 'S-\d-\d+-(\d+-){1,14}\d+$' } | ForEach-Object {
7070
"HKU:\$($_.PSChildName)\Software\Microsoft\Windows\CurrentVersion\Uninstall"

0 commit comments

Comments
 (0)