I want to connect to rRemote PC running Windows 10, from another PC using ManagementScope on a local network.

MiPakTeh 1,476 Reputation points
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.DirectoryServices;
using System.Drawing;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _2Com_1
    public partial class Form1 : Form
        public Form1()

        private void Form1_Load(object sender, EventArgs e)
            ConnectionOptions options = new ConnectionOptions();
            options.Username = "";
            options.Password = "";

            ManagementScope scope = new ManagementScope("\\\\\\root\\cimv2", options);
            scope.Options.EnablePrivileges = true;
            scope.Options.Impersonation = System.Management.ImpersonationLevel.Impersonate;


An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,507 questions
{count} votes