# WMIC command give Access denied

**URL:** <https://community.jenkins.io/t/wmic-command-give-access-denied/4610>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [November 17, 2022, 2:00pm UTC](https://community.jenkins.io/t/wmic-command-give-access-denied/4610 "2022-11-17T14:00:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomnickname](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@randomnickname](https://community.jenkins.io/u/randomnickname)\
**Post date:** [November 17, 2022, 2:00pm UTC](https://community.jenkins.io/t/wmic-command-give-access-denied/4610/1 "2022-11-17T14:00:48Z")

</div>

Hi,  
I’m new here!  
I have a problem when using the WMIC command with jenkins.  
What I am trying to do:  
**wmic process call create “cmd.exe”**  
or  
**wmic process where name=“program.exe” CALL setpriority “above normal”**

Result:  
12:45:32 ERROR:

12:45:32 Description = Access denied

Everything works using these commands directly on the Windows agent. Trying to run on Jenkins fails.

Does anyone know the solution to the above error?

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [November 17, 2022, 4:42pm UTC](https://community.jenkins.io/t/wmic-command-give-access-denied/4610/2 "2022-11-17T16:42:43Z")

</div>

does the user running jenkins (or the agent) have permission to do that?

---

<div class="post-metadata">

**Author:** ![randomnickname](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@randomnickname](https://community.jenkins.io/u/randomnickname)\
**Post date:** [November 17, 2022, 8:25pm UTC](https://community.jenkins.io/t/wmic-command-give-access-denied/4610/3 "2022-11-17T20:25:50Z")

</div>

I noticed that the problem is not with jenkins itself, but with the connection via SSH.  
I haven’t found a solution yet

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [November 17, 2022, 8:43pm UTC](https://community.jenkins.io/t/wmic-command-give-access-denied/4610/4 "2022-11-17T20:43:17Z")

</div>

okay, same question, is the user you are sshing into have access to run wmic? it seems like a windows security setting.
