0 votes

Hello,

I have a simple custom command supposed to get the user name which is connected to as specific computer.

The command line is :

$User = Get-WmiObject -Class Win32_ComputerSystem -ComputerName "%dNSHostName%" | Select-Object UserName

The error is :

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Trace de pile: at <ScriptBlock>, <No file>: line 8

If I connect to the Adaxes server, run a powershell with the same user that is configured for this script, and run the get-wmiobject cmdlet, then it works.

So why I get an access denied from the Adaxes console?

Thanks in advance!

by (1.1k points)

1 Answer

0 votes
by (215k points)

Hello,

PowerShell scripts in Adaxes are executed using the credentials of the Adaxes service account (specified during Adaxes installation), but network operations (e.g. getting instances of WMI objects using the Get-WmiObject cmdlet) are performed using the credentials specified in the Run as section of the Run a program or PowerShell script action. It looks like the account specified in the section does not have the necessary native Active Directory permissions in the domain where the target computer object resides. image.png Please, make sure that the account has the permissions in the domain and check whether the issue persists.

0

Thanks for your answer. I am sure about it, that's the problem. On the adaxes server, I run a powershell with "run as another user" and I used the "This acocunt" login. Doing this way I get the outpout from the cmdlet.

Related questions

0 votes
0 answers

Hi Evryone, I am trying to set up an external portal within a new webserver on dmz, and with only access to a webservice created from selfservice. The new webservice is only ... login, only reset password. What I am mising there that its not working? Thanks,

asked Nov 26, 2021 by yagoityd (20 points)
0 votes
1 answer

I'm trying to create a business rule that is executed before a user is created. I used the Adaxes tutorial Run PowerShell Script after Creating a User for ... execute. Are there permissions I'm forgetting somewhere? Thanks in advance for the assistance.

asked Jun 29, 2021 by lgibbens (320 points)
0 votes
1 answer

I've modified the script here https://www.adaxes.com/script-repository/import-users-to-be-deprovisioned-s3.htm to do bulk deprovisioning of accounts via a .csv file. It ... share and folder. Why is this throwing this error? They path works in file explorer.

asked Mar 26, 2021 by johnsonua (390 points)
0 votes
1 answer

We have multiple servers in our Adaxes cluster. One of the servers is throwing an error of "Access is denied." before a login page even comes ... step) +75 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +158

asked Aug 27, 2020 by mark.it.admin (1.8k points)
0 votes
1 answer

Since upgrading to 2019.2 I am no longer able to run scheduled reports, either automatically or manually. When looking at the log I see it fails at the "generate report ... is attempting. I can run the report directly with no problem. Can anyone help? Thanks,

asked Nov 21, 2019 by rossb (20 points)
2,740 questions
2,474 answers
6,475 comments
1,372,156 users