Honestly im not quite sure what im supposed to do with that answer :)
Windows Server 2016 Hyper-V and New-NetNat error 87
Hi,
I keep getting "Windows System Error 87" when trying to create the second NAT via PowerShell.
As you can see below i created the first on 192.168.2.0/24 and then trying to create the other one but i keep getting the error.
Any ideas of why?
]1
4 answers
Sort by: Most helpful
-
-
Limitless Technology 39,791 Reputation points
2021-09-02T16:03:47.197+00:00 Hello @nadsad
I have experienced the issue before, and the error is quite generic and misleading,
In my case it happened that for a reason, the the cmdlet worked in first place, due to some unexplained issue, the Get-NetNat was not showing the new created Nat.
Can you try to remove the Nat you are creating, with Remove-NetNat, and then run your New-NetNat?
Hope it helps!
-
nadsad 6 Reputation points
2021-09-02T16:18:03.37+00:00 Hi!
Thank you for the reply.
Unfortunately I have already tried. So I remove the NAT with Remove-NetNat and then I have no more NATs. I run New-NetNat for the first NAT and it works but then when I run it again to create second NAT I get the error.
-
Limitless Technology 39,791 Reputation points
2021-09-02T18:38:42.67+00:00 Hello again,
Error 87, commonly known as ERROR_INVALID_PARAMETER and described as The parameter is incorrect.
A possible cause for the failure is that the Offset and OffsetHigh members of the OVERLAPPED structure are not set to zero.
In many cases, the function calls may succeed if you do not explicitly set OVERLAPPED.Offset and OVERLAPPED.OffsetHigh to zero. However, this is usually either because the OVERLAPPED structure is static or global and therefore is initialized to zero, or the OVERLAPPED structure is automatic (local) and the contents of that location on the stack are already zero. You should explicitly set the OVERLAPPED.Offset and OVERLAPPED.OffsetHigh structure members to zero.
Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )Regards,