Powershell remote access denied

active-directorypowershellwindows-server-2003-r2windows-server-2008-r2

Last week we reinstalled ou AD (windows server 2008 R2), and reconfigured it (trust relationships, dns, dhcp).

There is my problem, I want to run a script to create folder remotly to a filesharing server (windows server 2003 R2 sp2), it worked fine before reinstalling the AD, but now I get this error :

Get-WmiObject: Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

and the script stop.

I clueless about that, I've been looking around the web but didn't found answer. I assume it's because that the windows server 2003 denied the access from the powershell script running from the AD, but don't know how to allow the access.

If you need more accurate information, I'll gladly give them.

Thank you.

Best Answer

I found the solution. I forgot to add DOMAIN\Administrator to the administrator group on the share server (target windows 2003 R2). Now that I did add it, everything work fine.

Hope this will help someone having this problem one day.