How to run a command on a remote Windows system as a user without an administrator with WMI?

I have a script written in Visual Basic that starts a process (given a script as an argument) on a remote system (again, given as an argument) using WMI. This script works fine when using an administrator account on a remote system, but when using a non-administrator account, the following error appears:

ConnectServer Failed w/ (-2147024891) Access is denied.

I would like to be able to start processes on remote systems as a non-administrator user with this script, and I am sure that the problem is related to the security settings on the remote system, but I could not reset correctly.

+3
source share
1 answer

It looks like you need to configure startup and activation permissions for this user on the target machine through DCOMCNFG. By default, non-administrator users do not have remote start and activation permissions.

Alternatively, depending on the operating system you are connecting to, there may be a "Distributed COM Users" group to which you can add your user. This group already has the appropriate permissions. The Distributed COM Users group was first included in Windows Server 2003 Service Pack 1 ( DCOM Security Enhancements ).

WMI DCOM . WMI DCOM serverfault / WMI ?.

+3

Source: https://habr.com/ru/post/1749668/


All Articles