I have 2 domains - let's call them RED and BLUE. I'm told that a trust is set up such that BLUE trusts everything from RED. I'm trying to connect from computer R in RED domain to computer B in BLUE domain.
Firstly, I can connect ok using B's local admin account:
ConnectionOptions opts = new ConnectionOptions();
opts.Username = "B\\Administrator";
opts.Password = "adminpassword";
ManagementScope scope = new ManagementScope("\\\\B.BLUE\\root\\cimv2", opts);
scope.Connect();
and this works fine - I then go on to reading performance counters - so there appears to be no blocking firewall or anything wrong here.
I then added my account RED\MusMuris to B's local administrator group. I can now log-on to windows directly on B as myself, however when I try using RED\MusMuris with my password via WMI I get an access denied.
However what I really don't get is that if I run the same program on a 2nd computer in the BLUE domain (call it B2) then it connects fine and runs using the RED\MusMuris account - so again it appears there is nothing on B stopping me from doing this and RED\MusMuris must have permissions to do this.
To add more confusion it appears that sometimes I can connect providing I'm logged into RED\R as myself and do not suppy my password. Then it's ok - adding the password back in fails again.
In all cases the fail is with an "Access Denied" error. Any ideas on where I could get help with this