Forum Discussion

Daniel Westerdale's avatar
Daniel Westerdale
Brass Contributor
Nov 17, 2017

Unable to install AD Services on VM

Hi

 

I am testing out a new dev/test SharePoint farm in Azure which isn't joined to the local lan. 

Anyway I have got as far as setting up the DS .   

 

 

Install-WindowsFeature -ComputerName "myserver" AD-Domain-Services -IncludeManagementTools

Install-WindowsFeature : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide
an argument that is not null or empty, and then try the command again.
At line:1 char:38
+ Install-WindowsFeature -ComputerName $adVm AD-Domain-Services -Includ ...
+                                      ~~~~~
    + CategoryInfo          : InvalidData: (:) [Install-WindowsFeature], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Windows.ServerManager.Commands.AddWindowsFeat
   ureCommand

 

 

 

To resolve this, I have 

  1. I have installed Remote Server Administration Tools for Windows 10
  2. Started WInRM
  3. Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value myVM

I am assuming  I won't be able to use the  AD DS Deployment Commandlets directly from my win10 client , until this issue is resolved

 

Just name resolution I guess?

 

 

 

 

6 Replies

  • kasunsjc's avatar
    kasunsjc
    Iron Contributor

    Hi Daniel,

     

    Use Enter-PSSession to login for the DC then you can install ADDS.

     

    What I can see in the error is it cant resolve the computer name are you storing the computer name as a variable?

    • Daniel Westerdale's avatar
      Daniel Westerdale
      Iron Contributor
      Hi @Kasun

      Thanks your reply. I will look into adding this to my script. BTW were my WinRM settings correct?

      I store the server name, location and resource group as variables.

      I will let you know how this goes on Monday.
      • kasunsjc's avatar
        kasunsjc
        Iron Contributor

        One important thing did you allow WinRM  from Network security group that attached to nic of the VM?

         

        Yes your WinRM setting is correct and make sure you have run the winrm qc command on you client pc to allow firewall rules 

Resources