PermissionDenied: (PS_DnsServerPrimaryZone:root

Randy Bordeaux 6 Reputation points
2022-05-20T09:28:32.767+00:00

I am running into an issue when trying to use a service account that is NOT a domain admin to create dns forward lookup zones on a remote DC

I am getting the error below;

Invoke-Command -Session $session -ScriptBlock {

  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : PermissionDenied: (PS_DnsServerPrimaryZone:root/Microsoft/...rverPrimaryZone) [Add-DnsSe
    rverPrimaryZone], CimException
  • FullyQualifiedErrorId : HRESULT 0x80041003,Add-DnsServerPrimaryZone
  • PSComputerName : <REDACTED>

I have not been able to find where I need to add permissions to allow this.

CIMv2 permissions have been added
DNS permissions have been added
enable-pssession has been configured properly
ports are open
firewall is open
password is good

any ideas?

Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,044 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,584 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Primoz Ivancic 0 Reputation points
    2024-10-18T08:58:15.8866667+00:00

    Add also Dns permissions under Microsoft of this service account.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.