Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
867 B
1
Indexable
Never
New-NetIPAddress : Cannot process argument transformation on parameter 'PrefixLength'. Cannot convert value
"255.255.255.0" to type "System.Byte". Error: "Input string was not in a correct format."
At C:\Source\IPAddress.ps1:20 char:79
+ ... Alias $nicName -IPAddress $newIP -PrefixLength $newSubnetMask -Defaul ...
+                                                    ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [New-NetIPAddress], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-NetIPAddress

You cannot call a method on a null-valued expression.
At C:\Source\IPAddress.ps1:40 char:1
+ $timer.Elapsed.AddScript({
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
Leave a Comment