File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,18 @@ if (!(Get-Module PSScriptAnalyzer) -and !$testingLibraryUsage)
66 Import-Module PSScriptAnalyzer
77}
88
9+ # Force Get-Help not to prompt for interactive input to download help using Update-Help
10+ # By adding this registry key we turn off Get-Help interactivity logic during ScriptRule parsing
11+ $null , " Wow6432Node" | ForEach-Object {
12+ try
13+ {
14+ Set-ItemProperty - Name " DisablePromptToUpdateHelp" - Path " HKLM:\SOFTWARE\$ ( $_ ) \Microsoft\PowerShell" - Value 1 - Force
15+ }
16+ catch
17+ {
18+ # Ignore for cases when tests are running in non-elevated more or registry key does not exist or not accessible
19+ }
20+
921$directory = Split-Path - Parent $MyInvocation.MyCommand.Path
1022$message = " this is help"
1123$measure = " Measure-RequiresRunAsAdministrator"
@@ -48,7 +60,7 @@ Describe "Test importing correct customized rules" {
4860 $customizedRulePath.Count | Should Be 1
4961
5062 # Force Get-Help not to prompt for interactive input to download help using Update-Help
51- # By adding this registry key we force to turn off Get-Help interactivity logic during ScriptRule parsing
63+ # By adding this registry key we turn off Get-Help interactivity logic during ScriptRule parsing
5264 $null , " Wow6432Node" | ForEach-Object {
5365 try
5466 {
You can’t perform that action at this time.
0 commit comments