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 (5.6k 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
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 (250 points)
0 votes
1 answer

I have an issue we don't fully understand. We are running Adaxes v2018.2. Last night I logged in to unlock a user account. Under the "User Management" section I clicked " ... been made to any of our accounts. Any suggestions as to where to look next? Thanks.

asked Apr 24, 2019 by mjewison (280 points)
0 votes
1 answer

Hi All, We have a reoccuring "Access is Denied" error for our Web Interface sites. This started frequently after upgrading to 2018 version and frequent reboots seem to clear ... the website, restarted the app pool. Still the same error - any advice? Thanks!

asked Jan 4, 2019 by jmarcellus (280 points)
0 votes
1 answer

Hello, I have tested an upgrade from 2017.2 to 2018.2. Everything is fine exept that when I tried to change somethings in a custom web site from /AdaxesConfig I get a ... 2 I restored all web sites from the backup but not the services. Thanks for you help.

asked Oct 24, 2018 by tentaal (5.6k points)
0 votes
1 answer

I previously had access to this area but when I now look at the area I can see All Requests &gt; Pending but not My Requests or My Approvals. when I attempt that I get the ... accessing. I've asked our other Admins and no one has made changes as far as I know.

asked Feb 21, 2018 by AlanWJ (740 points)
2,246 questions
2,007 answers
5,494 comments
19,944 users