Skip to content

Commit 495fe6d

Browse files
committed
test deployment
1 parent 69ed60d commit 495fe6d

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

Modules/Ruleset.ComputerInfo/Public/Test-Computer.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ function Test-Computer
121121

122122
Write-Debug -Message "[$($MyInvocation.InvocationName)] ParameterSet = $($PSCmdlet.ParameterSetName):$($PSBoundParameters | Out-String)"
123123

124+
# TODO: Run Deploy-Firewall (will will disconnect and remove CIM) and then this will fail
124125
if (Get-CimSession -Name RemoteCim)
125126
{
126127
$Status = $CimServer.TestConnection()

Modules/Ruleset.Firewall/Public/Export-FirewallRule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,5 +394,5 @@ function Export-FirewallRule
394394
}
395395
}
396396

397-
Write-Information -Tags $MyInvocation.InvocationName -MessageData "INFO: Exporting firewall rules into: '$FileName' done"
397+
Write-Information -Tags $MyInvocation.InvocationName -MessageData "INFO: Exporting firewall rules into '$FileName' done"
398398
}

Modules/Ruleset.Firewall/Public/Export-RegistryRule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,5 +321,5 @@ function Export-RegistryRule
321321
}
322322
}
323323

324-
Write-Information -Tags $MyInvocation.InvocationName -MessageData "INFO: Exporting firewall rules into: '$FileName' done"
324+
Write-Information -Tags $MyInvocation.InvocationName -MessageData "INFO: Exporting firewall rules into '$FileName' done"
325325
}

Modules/Ruleset.ProgramInfo/Public/Search-Installation.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function Search-Installation
211211
}
212212
"XTU"
213213
{
214-
Edit-Table "%ProgramFiles(x86)%\Intel\Intel(R) Extreme Tuning Utility\Client"
214+
Edit-Table "%ProgramFiles%\Intel\Intel(R) Extreme Tuning Utility\Client"
215215
break
216216
}
217217
"Chocolatey"

Modules/Ruleset.ProgramInfo/Public/Test-FileSystemPath.ps1

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,15 @@ function Test-FileSystemPath
130130
)
131131

132132
Write-Debug -Message "[$($MyInvocation.InvocationName)] ParameterSet = $($PSCmdlet.ParameterSetName):$($PSBoundParameters | Out-String)"
133-
function Write-Conditional
134-
{
135-
# TODO: Convert to script block
136-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
137-
"PSProvideCommentHelp", "", Scope = "Function", Justification = "Self explanatory function")]
133+
134+
$InvocationInfo = $MyInvocation.InvocationName
135+
$WriteConditional = {
138136
param ([string] $Message)
139137

140138
if ($Quiet)
141139
{
142140
# Make sure -Quiet switch does not make troubleshooting hard
143-
Write-Debug -Message "[$($MyInvocation.InvocationName)] $Message"
141+
Write-Debug -Message "[$InvocationInfo] $Message"
144142
}
145143
else
146144
{
@@ -150,7 +148,7 @@ function Test-FileSystemPath
150148
}
151149
else
152150
{
153-
Write-Warning -Message "[$($MyInvocation.InvocationName)] $Message"
151+
Write-Warning -Message "[$InvocationInfo] $Message"
154152
}
155153

156154
Write-Information -Tags $MyInvocation.InvocationName -MessageData "INFO: Path '$LiteralPath'"
@@ -159,7 +157,7 @@ function Test-FileSystemPath
159157

160158
if ([string]::IsNullOrEmpty($LiteralPath))
161159
{
162-
Write-Conditional "The path name is null or empty"
160+
& $WriteConditional "The path name is null or empty"
163161
return $false
164162
}
165163

@@ -217,7 +215,7 @@ function Test-FileSystemPath
217215
{
218216
if ($IsUserProfile)
219217
{
220-
Write-Conditional "A Path with environment variable which leads to user profile is not valid for firewall"
218+
& $WriteConditional "A Path with environment variable which leads to user profile is not valid for firewall"
221219
return $false
222220
}
223221

@@ -230,7 +228,7 @@ function Test-FileSystemPath
230228
{
231229
if ($RegexVariable.Value -notin $WhiteList)
232230
{
233-
Write-Conditional "Specified environment variable was not whitelisted for firewall"
231+
& $WriteConditional "Specified environment variable was not whitelisted for firewall"
234232
return $false
235233
}
236234

@@ -241,21 +239,21 @@ function Test-FileSystemPath
241239
{
242240
if ($Qualifier -notmatch "^[A-Za-z]:\\")
243241
{
244-
Write-Conditional "The path qualifier '$Qualifier' is not valid for firewall rules"
242+
& $WriteConditional "The path qualifier '$Qualifier' is not valid for firewall rules"
245243
return $false
246244
}
247245
}
248246
else
249247
{
250-
Write-Conditional "File system qualifier is required for firewall rules"
248+
& $WriteConditional "File system qualifier is required for firewall rules"
251249
return $false
252250
}
253251
}
254252

255253
# NOTE: Public folder and it's subdirectories are not user profile
256254
if (!$IsUserProfile -and $UserProfile -and ($ExpandedPath -notmatch "^(($env:SystemDrive\\?)|\\)Users(?!\\+(Public$|Public\\+))\\"))
257255
{
258-
Write-Conditional "The path does not lead to user profile"
256+
& $WriteConditional "The path does not lead to user profile"
259257
return $false
260258
}
261259
}
@@ -289,6 +287,6 @@ function Test-FileSystemPath
289287
}
290288
}
291289

292-
Write-Conditional $Status
290+
& $WriteConditional $Status
293291
return $false
294292
}

Readme/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ If you would like to see fresh changes done since last release you can do so on
4141
- KMS Connection broker (SppExtComObj.exe)
4242
- MSI
4343
- Store apps
44+
- Intel XTU
4445

4546
- Rule scripts, consistent rule formatting for all scripts
4647
- Rule scripts now support Interactive and Quiet switches

Rules/IPv4/Outbound/Software/Intel.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ $PSDefaultParameterValues["Test-ExecutableFile:Force"] = $Trusted -or $SkipSigna
101101
#
102102
# Intel installation directories
103103
#
104-
$IntelXTURoot = "%ProgramFiles(x86)%\Intel\Intel(R) Extreme Tuning Utility\Client"
104+
$IntelXTURoot = "%ProgramFiles%\Intel\Intel(R) Extreme Tuning Utility\Client"
105105

106106
# First remove all existing rules matching group
107107
Remove-NetFirewallRule -PolicyStore $PolicyStore -Group $Group -Direction $Direction -ErrorAction Ignore

0 commit comments

Comments
 (0)