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!