Set DNS host name for managed service account?Where are the default account settings for AD stored?How to properly remove lingering objects when -strict has been set on a large number of DCs for a long time?AD LDAP No Password RequiredGroup Managed Service Accounts: -PrincipalsAllowedToRetrieveManagedPasswordActive Directory Recycle Bin on child domain onlyHow to preselect Windows display DPI for Active Directory account?trust between two different forestsA linked mailbox user sometimes connects to wrong Exchange organizationNETLOGON EventID 5723 for Managed Service AccountUser principal name vs SAM account name

Should homeowners insurance cover the cost of the home?

Has the Hulk always been able to talk?

Is there an age requirement to play in Adventurers League?

What was Bran's plan to kill the Night King?

What do "Sech" and "Vich" mean in this sentence?

Why aren't nationalizations in Russia described as socialist?

As a GM, is it bad form to ask for a moment to think when improvising?

Which US defense organization would respond to an invasion like this?

Does "Captain Marvel" contain spoilers for "Avengers: Infinity War"?

How does summation index shifting work?

Dangerous workplace travelling

Start job from another SQL server instance

Notation: What does the tilde bellow of the Expectation mean?

Is Benjen dead?

What was the first story to feature the plot "the monsters were human all along"?

Is there precedent or are there procedures for a US president refusing to concede to an electoral defeat?

Where are the "shires" in the UK?

Why did WWI include Japan?

Mug and wireframe entirely disappeared

Would a small hole in a Faraday cage drastically reduce its effectiveness at blocking interference?

Hostile Divisor Numbers

Feasibility of lava beings?

Where to draw the line between quantum mechanics theory and its interpretation(s)?

Nested loops to process groups of pictures



Set DNS host name for managed service account?


Where are the default account settings for AD stored?How to properly remove lingering objects when -strict has been set on a large number of DCs for a long time?AD LDAP No Password RequiredGroup Managed Service Accounts: -PrincipalsAllowedToRetrieveManagedPasswordActive Directory Recycle Bin on child domain onlyHow to preselect Windows display DPI for Active Directory account?trust between two different forestsA linked mailbox user sometimes connects to wrong Exchange organizationNETLOGON EventID 5723 for Managed Service AccountUser principal name vs SAM account name






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








13















The documentation contains the example:



New-ADServiceAccount service1 -DNSHostName service1.contoso.com -Enabled $true


This parameter is required. What exactly is the purpose of a DNSHostName and how should I decide what to set it to?










share|improve this question




























    13















    The documentation contains the example:



    New-ADServiceAccount service1 -DNSHostName service1.contoso.com -Enabled $true


    This parameter is required. What exactly is the purpose of a DNSHostName and how should I decide what to set it to?










    share|improve this question
























      13












      13








      13


      0






      The documentation contains the example:



      New-ADServiceAccount service1 -DNSHostName service1.contoso.com -Enabled $true


      This parameter is required. What exactly is the purpose of a DNSHostName and how should I decide what to set it to?










      share|improve this question














      The documentation contains the example:



      New-ADServiceAccount service1 -DNSHostName service1.contoso.com -Enabled $true


      This parameter is required. What exactly is the purpose of a DNSHostName and how should I decide what to set it to?







      active-directory






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 30 '13 at 10:53









      Jason KresowatyJason Kresowaty

      2862520




      2862520




















          8 Answers
          8






          active

          oldest

          votes


















          6














          After working for a while with these accounts, I think I found out the reason:



          They are some subset, or maybe derivative of the machine type accounts. Therefore they inherit this property from them, and since it's required for the machine type, it's also required for gMSA.



          You can check that both types closely match in they attribute sets. Also in all of the TechNet documentation they just give a simple unique value for this attribute, gmsa-name.contoso.com, just like a machine account is having it.



          Not sure why they just didn't autogenerate it, and spare us the wondering and the typing.






          share|improve this answer























          • There are important implications for SPNs, as explained by this answer

            – alifen
            Apr 17 at 8:28


















          3














          I am no expert at this. However, there is such a dearth of information on this topic I thought it worth posting what I do know



          The trainer of a 70-411 course I took used the FQDN of a domain controller as the value for the DNSHostName parameter when he demonstrated the New-ADServiceAccount cmdlet. As I understand it, DNSHostName just tells the cmdlet which domain controller on which to create the account. I don't think it matters which DC you use, those gMSA's seem to replicate immediately anyway. I have been pointing DNSHostName to one of my DCs and it seems to be working so far.



          I'd really rather there were some concrete documentation on this. The applicable TechNet command reference is just tautological nonsense for the DNSHostName parameter.






          share|improve this answer






























            3














            When you add the parameter -RestrictToSingleComputer it's not required anymore. Of course you should read about that option before using it.



            Like:



            New-ADServiceAccount service1 -Enabled $true -RestrictToSingleComputer





            share|improve this answer


















            • 1





              That makes it a regular MSA account instead of gMSA

              – Brain2000
              Jan 25 '17 at 11:59


















            3














            The DNSHostName should be the name of your service.
            In case of A Cluster this would be your Virtual instance name.



            the DNSHostName is related to SPN Auto-registration of the account.
            In Active Directory Computers & GMSAs have the Permission "Allow Validated write to ServicePrincipalName".
            This means that a computer can only register SPNs that contain the name of itself.
            Example: A computer Named Webserver1 (DNS: Webserver1.mydomain.net) can auto-register http:/Webserver1.mydomain.net:443 but cannot register http:/Webserver55.mydomain.net:443



            So, the DNSHostName of a GMSA Should reflect what SPNs you want to register for a service.



            On a SQL cluster, you would have 2 hosts: Host1 and host2. A clusterName: Clu1 and a Virtual SQL Instance: SQL1
            If you want to use a GMSA to run the SQL1 service, you would create it like this.



            $comp1 = get-adcomputer Host1

            $comp2 = get-adcomputer Host2


            New-ADServiceAccount -Name gmsa01 -DNSHostName sql1.mydomain.net -PrincipalsAllowedToRetrieveManagedPassword $comp1, $comp2
            (you could also use a group instead of assigning rights to the hosts directly).



            Whenever the SQL service starts, it will automatically register 2 SPNs:
            MSSQLSvc/sql1.mydomain.net
            MSSQLSvc/sql1.mydomain.net:1433



            If you put something else in the DNSHostName (for example gmsa01.mydomain.net), The service will still start, but it will fail to register SPNs (and fall back to NTLM authentication).



            If you don’t care about Kerberos Authentication (and SPNs) or
            If you are ok with Manually registering SPNs for your service,
            You can put whatever you want in the DNSHostName. The GMSA will still work.



            I would not recommend putting your DomainController in the DNSName as mentioned earlier (unless you plan on using the GMSA to run a service on a domain controller).






            share|improve this answer
































              1














              I was looking for an answer for a very long time and finally found one that sounds true to me.




              -DNSHostName should be the FQDN of that DC which holds KDS Master key - msKds-ProvRootKey.



              Most likely you already created that one - take a look at Group Key Distribution Service container in Configuration partition of your AD forest.



              And probably you could use any DC in that forest as long as you set their names in -PrincipalsAllowedToRetrieveManagedPassword



              All of the above represents the "new" gMSA, so if you wish to use old MSA instead, just forget about that -DNSHostName since it's not required then and simply use -RestrictToSingleComputer locking an account to some server.



              Hope that helps.




              https://social.technet.microsoft.com/Forums/windowsserver/en-US/9a66d1d5-44e9-4ea1-ba9c-88862023c4e1/why-does-a-gmsa-need-a-dns-host-name-e-g-newadserviceaccount-dnshostname?forum=winserver8gen






              share|improve this answer























              • That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                – David Bullock
                Jul 3 '18 at 14:32


















              1














              My experience seems to indicate that it's looking for a DC. I ran a test on a member server and was prompted for the -DNSHostName I ran the same test from a DC and did not receive the prompt.






              share|improve this answer






























                0














                Check out this link: http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx



                The DNSHostName is the fully qualified domain name of your Service Account Name.



                New-ADServiceAccount -name -DNSHostName






                share|improve this answer


















                • 2





                  I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                  – Jason Stangroome
                  Aug 5 '13 at 4:40


















                0














                Quoting the answer by Proed on January 17, 2018 in the Why does a gMSA need a DNS host name? (thanks to @Daniel for citing it earlier).




                I would recommend to set the dNSHostName just like it is set as for
                the AD-Computer Object (sAMAccountName + and your Domain Suffix)




                … because:




                • msDS-GroupManagedServiceAccount inherits from AD-Computer (in terms of AD schema), thus requiring this to be supplied

                • the recommended convention makes sense of all the extant examples





                share|improve this answer























                • there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                  – David Bullock
                  Jul 3 '18 at 14:29











                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "2"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f503823%2fset-dns-host-name-for-managed-service-account%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                8 Answers
                8






                active

                oldest

                votes








                8 Answers
                8






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                6














                After working for a while with these accounts, I think I found out the reason:



                They are some subset, or maybe derivative of the machine type accounts. Therefore they inherit this property from them, and since it's required for the machine type, it's also required for gMSA.



                You can check that both types closely match in they attribute sets. Also in all of the TechNet documentation they just give a simple unique value for this attribute, gmsa-name.contoso.com, just like a machine account is having it.



                Not sure why they just didn't autogenerate it, and spare us the wondering and the typing.






                share|improve this answer























                • There are important implications for SPNs, as explained by this answer

                  – alifen
                  Apr 17 at 8:28















                6














                After working for a while with these accounts, I think I found out the reason:



                They are some subset, or maybe derivative of the machine type accounts. Therefore they inherit this property from them, and since it's required for the machine type, it's also required for gMSA.



                You can check that both types closely match in they attribute sets. Also in all of the TechNet documentation they just give a simple unique value for this attribute, gmsa-name.contoso.com, just like a machine account is having it.



                Not sure why they just didn't autogenerate it, and spare us the wondering and the typing.






                share|improve this answer























                • There are important implications for SPNs, as explained by this answer

                  – alifen
                  Apr 17 at 8:28













                6












                6








                6







                After working for a while with these accounts, I think I found out the reason:



                They are some subset, or maybe derivative of the machine type accounts. Therefore they inherit this property from them, and since it's required for the machine type, it's also required for gMSA.



                You can check that both types closely match in they attribute sets. Also in all of the TechNet documentation they just give a simple unique value for this attribute, gmsa-name.contoso.com, just like a machine account is having it.



                Not sure why they just didn't autogenerate it, and spare us the wondering and the typing.






                share|improve this answer













                After working for a while with these accounts, I think I found out the reason:



                They are some subset, or maybe derivative of the machine type accounts. Therefore they inherit this property from them, and since it's required for the machine type, it's also required for gMSA.



                You can check that both types closely match in they attribute sets. Also in all of the TechNet documentation they just give a simple unique value for this attribute, gmsa-name.contoso.com, just like a machine account is having it.



                Not sure why they just didn't autogenerate it, and spare us the wondering and the typing.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 19 '14 at 10:10









                StoinovStoinov

                4081914




                4081914












                • There are important implications for SPNs, as explained by this answer

                  – alifen
                  Apr 17 at 8:28

















                • There are important implications for SPNs, as explained by this answer

                  – alifen
                  Apr 17 at 8:28
















                There are important implications for SPNs, as explained by this answer

                – alifen
                Apr 17 at 8:28





                There are important implications for SPNs, as explained by this answer

                – alifen
                Apr 17 at 8:28













                3














                I am no expert at this. However, there is such a dearth of information on this topic I thought it worth posting what I do know



                The trainer of a 70-411 course I took used the FQDN of a domain controller as the value for the DNSHostName parameter when he demonstrated the New-ADServiceAccount cmdlet. As I understand it, DNSHostName just tells the cmdlet which domain controller on which to create the account. I don't think it matters which DC you use, those gMSA's seem to replicate immediately anyway. I have been pointing DNSHostName to one of my DCs and it seems to be working so far.



                I'd really rather there were some concrete documentation on this. The applicable TechNet command reference is just tautological nonsense for the DNSHostName parameter.






                share|improve this answer



























                  3














                  I am no expert at this. However, there is such a dearth of information on this topic I thought it worth posting what I do know



                  The trainer of a 70-411 course I took used the FQDN of a domain controller as the value for the DNSHostName parameter when he demonstrated the New-ADServiceAccount cmdlet. As I understand it, DNSHostName just tells the cmdlet which domain controller on which to create the account. I don't think it matters which DC you use, those gMSA's seem to replicate immediately anyway. I have been pointing DNSHostName to one of my DCs and it seems to be working so far.



                  I'd really rather there were some concrete documentation on this. The applicable TechNet command reference is just tautological nonsense for the DNSHostName parameter.






                  share|improve this answer

























                    3












                    3








                    3







                    I am no expert at this. However, there is such a dearth of information on this topic I thought it worth posting what I do know



                    The trainer of a 70-411 course I took used the FQDN of a domain controller as the value for the DNSHostName parameter when he demonstrated the New-ADServiceAccount cmdlet. As I understand it, DNSHostName just tells the cmdlet which domain controller on which to create the account. I don't think it matters which DC you use, those gMSA's seem to replicate immediately anyway. I have been pointing DNSHostName to one of my DCs and it seems to be working so far.



                    I'd really rather there were some concrete documentation on this. The applicable TechNet command reference is just tautological nonsense for the DNSHostName parameter.






                    share|improve this answer













                    I am no expert at this. However, there is such a dearth of information on this topic I thought it worth posting what I do know



                    The trainer of a 70-411 course I took used the FQDN of a domain controller as the value for the DNSHostName parameter when he demonstrated the New-ADServiceAccount cmdlet. As I understand it, DNSHostName just tells the cmdlet which domain controller on which to create the account. I don't think it matters which DC you use, those gMSA's seem to replicate immediately anyway. I have been pointing DNSHostName to one of my DCs and it seems to be working so far.



                    I'd really rather there were some concrete documentation on this. The applicable TechNet command reference is just tautological nonsense for the DNSHostName parameter.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 20 '13 at 2:25









                    alx9ralx9r

                    1,0661333




                    1,0661333





















                        3














                        When you add the parameter -RestrictToSingleComputer it's not required anymore. Of course you should read about that option before using it.



                        Like:



                        New-ADServiceAccount service1 -Enabled $true -RestrictToSingleComputer





                        share|improve this answer


















                        • 1





                          That makes it a regular MSA account instead of gMSA

                          – Brain2000
                          Jan 25 '17 at 11:59















                        3














                        When you add the parameter -RestrictToSingleComputer it's not required anymore. Of course you should read about that option before using it.



                        Like:



                        New-ADServiceAccount service1 -Enabled $true -RestrictToSingleComputer





                        share|improve this answer


















                        • 1





                          That makes it a regular MSA account instead of gMSA

                          – Brain2000
                          Jan 25 '17 at 11:59













                        3












                        3








                        3







                        When you add the parameter -RestrictToSingleComputer it's not required anymore. Of course you should read about that option before using it.



                        Like:



                        New-ADServiceAccount service1 -Enabled $true -RestrictToSingleComputer





                        share|improve this answer













                        When you add the parameter -RestrictToSingleComputer it's not required anymore. Of course you should read about that option before using it.



                        Like:



                        New-ADServiceAccount service1 -Enabled $true -RestrictToSingleComputer






                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Sep 8 '14 at 18:19









                        Bart van KleefBart van Kleef

                        8917




                        8917







                        • 1





                          That makes it a regular MSA account instead of gMSA

                          – Brain2000
                          Jan 25 '17 at 11:59












                        • 1





                          That makes it a regular MSA account instead of gMSA

                          – Brain2000
                          Jan 25 '17 at 11:59







                        1




                        1





                        That makes it a regular MSA account instead of gMSA

                        – Brain2000
                        Jan 25 '17 at 11:59





                        That makes it a regular MSA account instead of gMSA

                        – Brain2000
                        Jan 25 '17 at 11:59











                        3














                        The DNSHostName should be the name of your service.
                        In case of A Cluster this would be your Virtual instance name.



                        the DNSHostName is related to SPN Auto-registration of the account.
                        In Active Directory Computers & GMSAs have the Permission "Allow Validated write to ServicePrincipalName".
                        This means that a computer can only register SPNs that contain the name of itself.
                        Example: A computer Named Webserver1 (DNS: Webserver1.mydomain.net) can auto-register http:/Webserver1.mydomain.net:443 but cannot register http:/Webserver55.mydomain.net:443



                        So, the DNSHostName of a GMSA Should reflect what SPNs you want to register for a service.



                        On a SQL cluster, you would have 2 hosts: Host1 and host2. A clusterName: Clu1 and a Virtual SQL Instance: SQL1
                        If you want to use a GMSA to run the SQL1 service, you would create it like this.



                        $comp1 = get-adcomputer Host1

                        $comp2 = get-adcomputer Host2


                        New-ADServiceAccount -Name gmsa01 -DNSHostName sql1.mydomain.net -PrincipalsAllowedToRetrieveManagedPassword $comp1, $comp2
                        (you could also use a group instead of assigning rights to the hosts directly).



                        Whenever the SQL service starts, it will automatically register 2 SPNs:
                        MSSQLSvc/sql1.mydomain.net
                        MSSQLSvc/sql1.mydomain.net:1433



                        If you put something else in the DNSHostName (for example gmsa01.mydomain.net), The service will still start, but it will fail to register SPNs (and fall back to NTLM authentication).



                        If you don’t care about Kerberos Authentication (and SPNs) or
                        If you are ok with Manually registering SPNs for your service,
                        You can put whatever you want in the DNSHostName. The GMSA will still work.



                        I would not recommend putting your DomainController in the DNSName as mentioned earlier (unless you plan on using the GMSA to run a service on a domain controller).






                        share|improve this answer





























                          3














                          The DNSHostName should be the name of your service.
                          In case of A Cluster this would be your Virtual instance name.



                          the DNSHostName is related to SPN Auto-registration of the account.
                          In Active Directory Computers & GMSAs have the Permission "Allow Validated write to ServicePrincipalName".
                          This means that a computer can only register SPNs that contain the name of itself.
                          Example: A computer Named Webserver1 (DNS: Webserver1.mydomain.net) can auto-register http:/Webserver1.mydomain.net:443 but cannot register http:/Webserver55.mydomain.net:443



                          So, the DNSHostName of a GMSA Should reflect what SPNs you want to register for a service.



                          On a SQL cluster, you would have 2 hosts: Host1 and host2. A clusterName: Clu1 and a Virtual SQL Instance: SQL1
                          If you want to use a GMSA to run the SQL1 service, you would create it like this.



                          $comp1 = get-adcomputer Host1

                          $comp2 = get-adcomputer Host2


                          New-ADServiceAccount -Name gmsa01 -DNSHostName sql1.mydomain.net -PrincipalsAllowedToRetrieveManagedPassword $comp1, $comp2
                          (you could also use a group instead of assigning rights to the hosts directly).



                          Whenever the SQL service starts, it will automatically register 2 SPNs:
                          MSSQLSvc/sql1.mydomain.net
                          MSSQLSvc/sql1.mydomain.net:1433



                          If you put something else in the DNSHostName (for example gmsa01.mydomain.net), The service will still start, but it will fail to register SPNs (and fall back to NTLM authentication).



                          If you don’t care about Kerberos Authentication (and SPNs) or
                          If you are ok with Manually registering SPNs for your service,
                          You can put whatever you want in the DNSHostName. The GMSA will still work.



                          I would not recommend putting your DomainController in the DNSName as mentioned earlier (unless you plan on using the GMSA to run a service on a domain controller).






                          share|improve this answer



























                            3












                            3








                            3







                            The DNSHostName should be the name of your service.
                            In case of A Cluster this would be your Virtual instance name.



                            the DNSHostName is related to SPN Auto-registration of the account.
                            In Active Directory Computers & GMSAs have the Permission "Allow Validated write to ServicePrincipalName".
                            This means that a computer can only register SPNs that contain the name of itself.
                            Example: A computer Named Webserver1 (DNS: Webserver1.mydomain.net) can auto-register http:/Webserver1.mydomain.net:443 but cannot register http:/Webserver55.mydomain.net:443



                            So, the DNSHostName of a GMSA Should reflect what SPNs you want to register for a service.



                            On a SQL cluster, you would have 2 hosts: Host1 and host2. A clusterName: Clu1 and a Virtual SQL Instance: SQL1
                            If you want to use a GMSA to run the SQL1 service, you would create it like this.



                            $comp1 = get-adcomputer Host1

                            $comp2 = get-adcomputer Host2


                            New-ADServiceAccount -Name gmsa01 -DNSHostName sql1.mydomain.net -PrincipalsAllowedToRetrieveManagedPassword $comp1, $comp2
                            (you could also use a group instead of assigning rights to the hosts directly).



                            Whenever the SQL service starts, it will automatically register 2 SPNs:
                            MSSQLSvc/sql1.mydomain.net
                            MSSQLSvc/sql1.mydomain.net:1433



                            If you put something else in the DNSHostName (for example gmsa01.mydomain.net), The service will still start, but it will fail to register SPNs (and fall back to NTLM authentication).



                            If you don’t care about Kerberos Authentication (and SPNs) or
                            If you are ok with Manually registering SPNs for your service,
                            You can put whatever you want in the DNSHostName. The GMSA will still work.



                            I would not recommend putting your DomainController in the DNSName as mentioned earlier (unless you plan on using the GMSA to run a service on a domain controller).






                            share|improve this answer















                            The DNSHostName should be the name of your service.
                            In case of A Cluster this would be your Virtual instance name.



                            the DNSHostName is related to SPN Auto-registration of the account.
                            In Active Directory Computers & GMSAs have the Permission "Allow Validated write to ServicePrincipalName".
                            This means that a computer can only register SPNs that contain the name of itself.
                            Example: A computer Named Webserver1 (DNS: Webserver1.mydomain.net) can auto-register http:/Webserver1.mydomain.net:443 but cannot register http:/Webserver55.mydomain.net:443



                            So, the DNSHostName of a GMSA Should reflect what SPNs you want to register for a service.



                            On a SQL cluster, you would have 2 hosts: Host1 and host2. A clusterName: Clu1 and a Virtual SQL Instance: SQL1
                            If you want to use a GMSA to run the SQL1 service, you would create it like this.



                            $comp1 = get-adcomputer Host1

                            $comp2 = get-adcomputer Host2


                            New-ADServiceAccount -Name gmsa01 -DNSHostName sql1.mydomain.net -PrincipalsAllowedToRetrieveManagedPassword $comp1, $comp2
                            (you could also use a group instead of assigning rights to the hosts directly).



                            Whenever the SQL service starts, it will automatically register 2 SPNs:
                            MSSQLSvc/sql1.mydomain.net
                            MSSQLSvc/sql1.mydomain.net:1433



                            If you put something else in the DNSHostName (for example gmsa01.mydomain.net), The service will still start, but it will fail to register SPNs (and fall back to NTLM authentication).



                            If you don’t care about Kerberos Authentication (and SPNs) or
                            If you are ok with Manually registering SPNs for your service,
                            You can put whatever you want in the DNSHostName. The GMSA will still work.



                            I would not recommend putting your DomainController in the DNSName as mentioned earlier (unless you plan on using the GMSA to run a service on a domain controller).







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Apr 25 at 22:55









                            Jon

                            1054




                            1054










                            answered Nov 16 '18 at 13:18









                            KNJKNJ

                            311




                            311





















                                1














                                I was looking for an answer for a very long time and finally found one that sounds true to me.




                                -DNSHostName should be the FQDN of that DC which holds KDS Master key - msKds-ProvRootKey.



                                Most likely you already created that one - take a look at Group Key Distribution Service container in Configuration partition of your AD forest.



                                And probably you could use any DC in that forest as long as you set their names in -PrincipalsAllowedToRetrieveManagedPassword



                                All of the above represents the "new" gMSA, so if you wish to use old MSA instead, just forget about that -DNSHostName since it's not required then and simply use -RestrictToSingleComputer locking an account to some server.



                                Hope that helps.




                                https://social.technet.microsoft.com/Forums/windowsserver/en-US/9a66d1d5-44e9-4ea1-ba9c-88862023c4e1/why-does-a-gmsa-need-a-dns-host-name-e-g-newadserviceaccount-dnshostname?forum=winserver8gen






                                share|improve this answer























                                • That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                                  – David Bullock
                                  Jul 3 '18 at 14:32















                                1














                                I was looking for an answer for a very long time and finally found one that sounds true to me.




                                -DNSHostName should be the FQDN of that DC which holds KDS Master key - msKds-ProvRootKey.



                                Most likely you already created that one - take a look at Group Key Distribution Service container in Configuration partition of your AD forest.



                                And probably you could use any DC in that forest as long as you set their names in -PrincipalsAllowedToRetrieveManagedPassword



                                All of the above represents the "new" gMSA, so if you wish to use old MSA instead, just forget about that -DNSHostName since it's not required then and simply use -RestrictToSingleComputer locking an account to some server.



                                Hope that helps.




                                https://social.technet.microsoft.com/Forums/windowsserver/en-US/9a66d1d5-44e9-4ea1-ba9c-88862023c4e1/why-does-a-gmsa-need-a-dns-host-name-e-g-newadserviceaccount-dnshostname?forum=winserver8gen






                                share|improve this answer























                                • That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                                  – David Bullock
                                  Jul 3 '18 at 14:32













                                1












                                1








                                1







                                I was looking for an answer for a very long time and finally found one that sounds true to me.




                                -DNSHostName should be the FQDN of that DC which holds KDS Master key - msKds-ProvRootKey.



                                Most likely you already created that one - take a look at Group Key Distribution Service container in Configuration partition of your AD forest.



                                And probably you could use any DC in that forest as long as you set their names in -PrincipalsAllowedToRetrieveManagedPassword



                                All of the above represents the "new" gMSA, so if you wish to use old MSA instead, just forget about that -DNSHostName since it's not required then and simply use -RestrictToSingleComputer locking an account to some server.



                                Hope that helps.




                                https://social.technet.microsoft.com/Forums/windowsserver/en-US/9a66d1d5-44e9-4ea1-ba9c-88862023c4e1/why-does-a-gmsa-need-a-dns-host-name-e-g-newadserviceaccount-dnshostname?forum=winserver8gen






                                share|improve this answer













                                I was looking for an answer for a very long time and finally found one that sounds true to me.




                                -DNSHostName should be the FQDN of that DC which holds KDS Master key - msKds-ProvRootKey.



                                Most likely you already created that one - take a look at Group Key Distribution Service container in Configuration partition of your AD forest.



                                And probably you could use any DC in that forest as long as you set their names in -PrincipalsAllowedToRetrieveManagedPassword



                                All of the above represents the "new" gMSA, so if you wish to use old MSA instead, just forget about that -DNSHostName since it's not required then and simply use -RestrictToSingleComputer locking an account to some server.



                                Hope that helps.




                                https://social.technet.microsoft.com/Forums/windowsserver/en-US/9a66d1d5-44e9-4ea1-ba9c-88862023c4e1/why-does-a-gmsa-need-a-dns-host-name-e-g-newadserviceaccount-dnshostname?forum=winserver8gen







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered May 12 '15 at 18:56









                                DanielDaniel

                                5,13922153




                                5,13922153












                                • That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                                  – David Bullock
                                  Jul 3 '18 at 14:32

















                                • That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                                  – David Bullock
                                  Jul 3 '18 at 14:32
















                                That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                                – David Bullock
                                Jul 3 '18 at 14:32





                                That same thread now has a better answer by Proed in Jan 2018. It's got to do with satisfying the inheritance hierarchy in the AD schema! Xref my answer.. Thanks for finding that thread though!

                                – David Bullock
                                Jul 3 '18 at 14:32











                                1














                                My experience seems to indicate that it's looking for a DC. I ran a test on a member server and was prompted for the -DNSHostName I ran the same test from a DC and did not receive the prompt.






                                share|improve this answer



























                                  1














                                  My experience seems to indicate that it's looking for a DC. I ran a test on a member server and was prompted for the -DNSHostName I ran the same test from a DC and did not receive the prompt.






                                  share|improve this answer

























                                    1












                                    1








                                    1







                                    My experience seems to indicate that it's looking for a DC. I ran a test on a member server and was prompted for the -DNSHostName I ran the same test from a DC and did not receive the prompt.






                                    share|improve this answer













                                    My experience seems to indicate that it's looking for a DC. I ran a test on a member server and was prompted for the -DNSHostName I ran the same test from a DC and did not receive the prompt.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Jun 17 '15 at 21:56









                                    AllenAllen

                                    111




                                    111





















                                        0














                                        Check out this link: http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx



                                        The DNSHostName is the fully qualified domain name of your Service Account Name.



                                        New-ADServiceAccount -name -DNSHostName






                                        share|improve this answer


















                                        • 2





                                          I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                                          – Jason Stangroome
                                          Aug 5 '13 at 4:40















                                        0














                                        Check out this link: http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx



                                        The DNSHostName is the fully qualified domain name of your Service Account Name.



                                        New-ADServiceAccount -name -DNSHostName






                                        share|improve this answer


















                                        • 2





                                          I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                                          – Jason Stangroome
                                          Aug 5 '13 at 4:40













                                        0












                                        0








                                        0







                                        Check out this link: http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx



                                        The DNSHostName is the fully qualified domain name of your Service Account Name.



                                        New-ADServiceAccount -name -DNSHostName






                                        share|improve this answer













                                        Check out this link: http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx



                                        The DNSHostName is the fully qualified domain name of your Service Account Name.



                                        New-ADServiceAccount -name -DNSHostName







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered May 2 '13 at 22:35









                                        Brandon LawsonBrandon Lawson

                                        36414




                                        36414







                                        • 2





                                          I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                                          – Jason Stangroome
                                          Aug 5 '13 at 4:40












                                        • 2





                                          I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                                          – Jason Stangroome
                                          Aug 5 '13 at 4:40







                                        2




                                        2





                                        I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                                        – Jason Stangroome
                                        Aug 5 '13 at 4:40





                                        I'm still no clearer about when the DNSHostName would be used or what the impact would be if it is given the wrong value.

                                        – Jason Stangroome
                                        Aug 5 '13 at 4:40











                                        0














                                        Quoting the answer by Proed on January 17, 2018 in the Why does a gMSA need a DNS host name? (thanks to @Daniel for citing it earlier).




                                        I would recommend to set the dNSHostName just like it is set as for
                                        the AD-Computer Object (sAMAccountName + and your Domain Suffix)




                                        … because:




                                        • msDS-GroupManagedServiceAccount inherits from AD-Computer (in terms of AD schema), thus requiring this to be supplied

                                        • the recommended convention makes sense of all the extant examples





                                        share|improve this answer























                                        • there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                                          – David Bullock
                                          Jul 3 '18 at 14:29















                                        0














                                        Quoting the answer by Proed on January 17, 2018 in the Why does a gMSA need a DNS host name? (thanks to @Daniel for citing it earlier).




                                        I would recommend to set the dNSHostName just like it is set as for
                                        the AD-Computer Object (sAMAccountName + and your Domain Suffix)




                                        … because:




                                        • msDS-GroupManagedServiceAccount inherits from AD-Computer (in terms of AD schema), thus requiring this to be supplied

                                        • the recommended convention makes sense of all the extant examples





                                        share|improve this answer























                                        • there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                                          – David Bullock
                                          Jul 3 '18 at 14:29













                                        0












                                        0








                                        0







                                        Quoting the answer by Proed on January 17, 2018 in the Why does a gMSA need a DNS host name? (thanks to @Daniel for citing it earlier).




                                        I would recommend to set the dNSHostName just like it is set as for
                                        the AD-Computer Object (sAMAccountName + and your Domain Suffix)




                                        … because:




                                        • msDS-GroupManagedServiceAccount inherits from AD-Computer (in terms of AD schema), thus requiring this to be supplied

                                        • the recommended convention makes sense of all the extant examples





                                        share|improve this answer













                                        Quoting the answer by Proed on January 17, 2018 in the Why does a gMSA need a DNS host name? (thanks to @Daniel for citing it earlier).




                                        I would recommend to set the dNSHostName just like it is set as for
                                        the AD-Computer Object (sAMAccountName + and your Domain Suffix)




                                        … because:




                                        • msDS-GroupManagedServiceAccount inherits from AD-Computer (in terms of AD schema), thus requiring this to be supplied

                                        • the recommended convention makes sense of all the extant examples






                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Jul 3 '18 at 14:29









                                        David BullockDavid Bullock

                                        51631117




                                        51631117












                                        • there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                                          – David Bullock
                                          Jul 3 '18 at 14:29

















                                        • there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                                          – David Bullock
                                          Jul 3 '18 at 14:29
















                                        there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                                        – David Bullock
                                        Jul 3 '18 at 14:29





                                        there I was thinking I was stupid for not 'getting it', and it's just bad doco yet again

                                        – David Bullock
                                        Jul 3 '18 at 14:29

















                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Server Fault!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f503823%2fset-dns-host-name-for-managed-service-account%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                                        Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                                        Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020