We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89b9d64 commit 742032aCopy full SHA for 742032a
PoshNmap/Private/FormatStringOut.ps1
@@ -12,15 +12,16 @@ Change what is shown when the supplied object is cast to a string. Use $this to
12
)
13
14
process {
15
- if (-not $inputObject) {continue}
16
- $AddMemberParams = @{
17
- InputObject = $inputObject
18
- MemberType = 'ScriptMethod'
19
- Name = 'ToString'
20
- Force = $true
21
- Value = $scriptBlock
+ if ($inputObject) {
+ $AddMemberParams = @{
+ InputObject = $inputObject
+ MemberType = 'ScriptMethod'
+ Name = 'ToString'
+ Force = $true
+ Value = $scriptBlock
22
+ }
23
+ Add-Member @AddMemberParams
24
}
- Add-Member @AddMemberParams
25
26
27
0 commit comments