Skip to content

Commit 80d407c

Browse files
committed
Fixed typo in Test-WSMan call.
1 parent 4d1c0b3 commit 80d407c

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Functions/Get-EternalBlueVulnerabilityStatistics.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<#PSScriptInfo
22
33
.Version
4-
1.3
4+
1.4
55
.Guid
66
038a1c05-b1da-48c9-893d-4084b99f831b
77
.Author
@@ -13,7 +13,7 @@
1313
.ExternalModuleDependencies
1414
NetTCPIP
1515
.ReleaseNotes
16-
Added KB articles: KB4019217, KB4019264.
16+
Added Name alias of PSComputerName. Fixed typo in Test-WSMan test.
1717
1818
#>
1919

@@ -100,7 +100,7 @@ param (
100100
}
101101
})]
102102
[Alias(
103-
"ComputerName"
103+
"ComputerName", "PSComputerName"
104104
)]
105105
[String[]]
106106
$Name = $env:COMPUTERNAME,
@@ -211,7 +211,7 @@ process {
211211
foreach ($nameValue in $Name) {
212212
try {
213213
$protocol = "WSMAN"
214-
$protocolTest = Test-WSMan -ComputerName $name -ErrorAction Stop
214+
$protocolTest = Test-WSMan -ComputerName $nameValue -ErrorAction Stop
215215
if ($null -eq $protocolTest -or $protocol.ProductVersion -contains "Stack: 2.0") {
216216
$protocol = "DCOM"
217217
}

Functions/New-NetStaticIPAddress.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,9 @@ param (
146146
[String]
147147
$IPAddress,
148148

149-
[Parameter(
150-
Mandatory = $true
151-
)]
149+
[Parameter()]
152150
[String]
153-
$DefaultGateway,
151+
$DefaultGateway = [String]::Empty,
154152

155153
[Parameter(
156154
Mandatory = $true

0 commit comments

Comments
 (0)