Inveigh icon indicating copy to clipboard operation
Inveigh copied to clipboard

cant set nbms types

Open chppppp opened this issue 5 years ago • 5 comments

PS C:\Windows\System32\spool\drivers\color> Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes
 '00,20,03,1B,1C' -MachineAccounts Y
Invoke-Inveigh : Cannot validate argument on parameter 'NBNSTypes'. The argument "00,20,03,1B,1C" does not belong to
the set "00,03,20,1B,1C,1D,1E" specified by the ValidateSet attribute. Supply an argument that is in the set and then
try the command again.
At line:1 char:78
+ Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes '00 ...
+                                                                              ~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Inveigh], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-Inveigh

chppppp avatar Sep 11 '19 14:09 chppppp

without the quotes:

PS C:\Windows\System32\spool\drivers\color> Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes
 00,20,03,1B,1C -MachineAccounts Y
Invoke-Inveigh : Cannot validate argument on parameter 'NBNSTypes'. The argument "0" does not belong to the set
"00,03,20,1B,1C,1D,1E" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the
command again.
At line:1 char:78
+ Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes 00, ...
+                                                                              ~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Inveigh], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-Inveigh

chppppp avatar Sep 11 '19 14:09 chppppp

this works, notice the quotes around the 00.

Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes '00',20,03,1B,1C -MachineAccounts Y

chppppp avatar Sep 11 '19 14:09 chppppp

Is that on Windows 10? I just tested this and it works as documented with Windows 7 but errors out on Windows 10. For me though, both 00 and 03 needed quotes.

Kevin-Robertson avatar Sep 11 '19 21:09 Kevin-Robertson

Yes! sorry! Win10 and yes, I did have to quote '03' as well.

chppppp avatar Sep 11 '19 21:09 chppppp

looks like anything starting with 0 is being treated as an int

chppppp avatar Sep 11 '19 21:09 chppppp