2 Answers
2

Is it possible you have Windows firewall (or a 3rd party firewall) enabled that is blocking the WMI call? Port 135 needs to be open for WMI to work properly. See this article for details about connecting WMI through a firewall.

Edit:

I did some more digging about this - you problem is how WMIC uses your credentials when it tries to connect to networkPC. You are running WMIC in it's default impersonation mode of "Impersonate" - this allows WMIC to Impersonate your account on the local computer (the computers in compList.txt) - but when it tries to connect to a remote computer (networkPC) it cannot impersonate you, so it connects as NT AUTHORITY\ANONYMOUS LOGON.

I think you have 2 possible solutions here:

Allow the share on networkPC to have read access for NT AUTHORITY\ANONYMOUS LOGON - this is a little more complicated than it sounds - you must give ANONYMOUS LOGON share and file level permissions, as well as allowing it to activate WMI in dcomcfg

Setup your WMIC call to use Delegate impersonation. This requires you to set the user and computer accounts in AD up with "Trusted for Delegation" authority. You can then call wmic with the /IMPLEVEL:Delegate - but this opens up a new problem because you also need to pass in the /AUTHORITY:"kerberos:targetdomain\targetcomputer" parameter - and targetcomputer is the name of the computer from compList.txt - this means you would need to put your wmic calls in a loop around the computers in compList.txt instead of using /NODE:@compList.txt

no firewall or any blocks at all as i said, there are certain things that i manage to do with WMIC like simply launching EXE files on the remote computer (the EXE launched well on the remote pc) the only problem I'm facing with WMIC is using to copy files from another hostname.
–
user34544Feb 11 '10 at 17:26

@aabluedragon - check my edit, I think I figured out your problem, and gave a few possible solutions
–
MattBFeb 11 '10 at 22:52

One way I have gotten past this error is to use runas. If you have access to a command line, then use /runas:<domain>\<domainadmin> cmd.exe. You will get a second command line that runs with domain admin credentials. (Note: to perform on windows 7, you may have to elevate past the UAC.)