title: Import-Module ActiveDirectory powershell error
body: <p>I am creating a script that asks the user for the first and last name and implements it in a group in Active Directory. Below shows how the script starts</p>
  <pre><code>Import-Module ActiveDirectory
  
  #Get-Command New-ADUser -Syntax
  
  $firstName = Read-Host -Prompt &quot;Please enter the first name&quot;
  $lastName = Read-Host -Prompt &quot;Please enter the last name&quot;
  </code></pre>
  <p>The text below shows the body of the script where the information is put</p>
  <pre><code>New-ADUser ` 
      -Name &quot;$firstName $lastName&quot; `
      -GivenName $firstName `
      -Surname $lastName `
      -UserPrincipalName = &quot;$firstName.lastname&quot;
      -EmailAddress &quot;$firstName.$lastName@&lt;domain&gt;&quot;
      -ChangePasswordAtLogon 1 `
      -Enabled 1 `
      -StreetAddress &quot;&lt;info&gt;&quot; `
      -Office &quot;&lt;info&gt;&quot; `
      -State &quot;&lt;info&gt;&quot; `
      -PostalCode &quot;&lt;info&gt;&quot; `
      -Country &quot;&lt;info&gt;&quot; `
      -Path &quot;&lt;path&gt;&quot; 
  </code></pre>
  <p>I get an error that is shown below showing that objects are not found. The errors are shown below</p>
  <pre><code>-Name$firstName $lastName : The term '-Name$firstName $lastName' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At line:9 char:5
  +     -Name&quot;$firstName $lastName&quot; `
  +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (-Name$firstName $lastName:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
   
  -EmailAddress : The term '-EmailAddress' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At line:13 char:5
  +     -EmailAddress &quot;$firstName.$lastName@irtc-tx.com&quot;
  +     ~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (-EmailAddress:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
   
  -ChangePasswordAtLogon : The term '-ChangePasswordAtLogon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At line:14 char:5
  +     -ChangePasswordAtLogon 1 `
  +     ~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (-ChangePasswordAtLogon:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>
  <p>I have checked spelling and that doesnt seem to be an issue. Is there an obvious mistake I am making?</p>