Author Posts

March 22, 2016 at 2:09 am

When trying to use:

Get-WmiObject -ComputerName 10.0.0.x -Namespace root/cimv2 -Class __SystemSecurity -Credential "10.0.0.x\administrator"

I get results being returned.

When using:

Get-WmiObject -ComputerName 10.0.0.x -Namespace root/cimv2 -Class __SystemSecurity -Credential "DOMAIN\administrator"

I get the error message below:

Get-WmiObject : The application called an interface that was marshalled for a different thread. 

I have to use WMI due to some machines not having Powershell and I have to use a domain account.

There is no firewall in between as the query successfully runs with "10.0.0.x\administrator" credentials.

This is in a lab environment with machines setup for testing this specific use case, no firewall, icmp allowed, services are started.

Any advice or assistance will be great.

Thank you!

March 22, 2016 at 2:40 am

If i recall correctly, there's no user in a domain called Administrator. Even when you do the first DCPromo to convert a server to a DC with active directory, the local administrator user isn't available anymore.

Instead try creating a domain user, give it admin permission on the node and then use his credentials in the command.

March 22, 2016 at 2:43 am

Hi Arie,

I've also attempted this. Still no luck.

March 22, 2016 at 2:52 am

Its not the account. The first account in the domain is Administrator. Its in the Users container and gives similar permissions to being in the domain admins group. Domain controllers don't have local accounts but all other machines in the domain do.

I tried running you WMI calls and they both worked – using local administrator and domain administrator and my account (member of domain admins). This was on Windows 2012 R2 running latest RTM version of PowerShell 5.0 What are you running?

March 22, 2016 at 3:36 am

Hi Richard,

I'm trying to run this as a domain admin on a remote machine.
Running queries from the AD machine to the remote machines.
Have you tried to run these queries against remote machines?

March 22, 2016 at 4:03 am

Can we see your script? This is a very odd error, and I've never seen it happen to anyone else before.

March 22, 2016 at 4:12 am

Hi Dave,

The script is pretty much the one liner for now. I need to get the domain user working. Once I achieve that with the simply query, then I will expand on this.

Get-WmiObject -ComputerName 10.0.0.x -Namespace root/cimv2 -Class __SystemSecurity -Credential "DOMAIN\administrator"

March 22, 2016 at 4:45 am

Wow... I have no idea. :\

March 29, 2016 at 10:24 pm

Built a new machine that was added to the domain. This machine was not the server with AD on it. For some reason the script now works. I'm not sure where the issue was.