Get-NetNat: Invalid class on windows 2023 devkit ARM64

Zuyi Hu 0 Reputation points
2023-08-27T15:53:29.8566667+00:00

when I use Get-NetNat on windows 11 ARM64 on windows 2023 devkit, it report follow error:

Microsoft Windows [Version 10.0.22621.2215]
(c) Microsoft Corporation. All rights reserved.

C:\Users\hzy>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\hzy> Get-NetNat
Get-NetNat : Invalid class
At line:1 char:1
+ Get-NetNat
+ ~~~~~~~~~~
    + CategoryInfo          : MetadataError: (MSFT_NetNat:root/StandardCimv2/MSFT_NetNat) [Get-NetNat], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041010,Get-NetNat

PS C:\Users\hzy>

How can I fix this issue?

Windows for business Windows Client for IT Pros Storage high availability Virtualization and Hyper-V
Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,746 Reputation points
    2023-08-28T10:34:04.3566667+00:00

    Hello there,

    This might be due to the WMI repository being corrupted, in that case, try the below steps.

    Disable and stop the WMI service

    sc config winmgmt start= disabled

    net stop winmgmt

    Run the following commands

    Winmgmt /salvagerepository %windir%\System32\wbem

    Winmgmt /resetrepository %windir%\System32\wbem

    Re-enable the WMI service and reboot

    sc config winmgmt start= auto

    Verify that the version of Windows Server you are using (2023 DevKit ARM64) supports the Get-NetNat command. Sometimes, certain features or commands may not be available on specific editions or configurations of Windows Server.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.