> For the complete documentation index, see [llms.txt](https://www.netexec.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.netexec.wiki/wmi-protocol/authentication.md).

# Authentication

## Testing credentials

You can use two methods to authenticate to the WMI: `windows` or `local` (default: `windows`). To use local auth, add the following flag `--local-auth`

### **Windows auth**

* With SMB port open

```bash
nxc wmi 10.10.10.52 -u james -p 'J@m3s_P@ssW0rd!'
```

* With SMB port close, add the flag `-d DOMAIN`

```bash
nxc wmi 10.10.10.52 -u james -p 'J@m3s_P@ssW0rd!' -d HTB
```

Expected Results:

```bash
WMI       10.10.10.52     1433   MANTIS           [+] HTB\james:J@m3s_P@ssW0rd! 
```

### **Local auth**

```bash
nxc wmi 10.10.10.52 -u admin -p 'admin' --local-auth
```
