title: Powershell - Azure AD : User creation - PasswordProfile error message
body: <p>I am doing some tests to manage Azure AD users and groups with Powershell.
  Unfortunately, i have an issue when i try to create an user. Here my code :</p>
  <p>#Specifies the user's password profile.
  <em>$PasswordProfile=New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile
  $PasswordProfile.Password = &quot;xxxx&quot;</em></p>
  <p>#Create a AzureAD user account
  <em>PS C:\Windows\system32&gt; New-AzureADUser <code>-DisplayName &quot;Power SHELL&quot;</code>
  -GivenName &quot;Power&quot; <code>-SurName &quot;SHELL&quot;</code></em>
  <em>-UserPrincipalName power.shell@xxxx.xx <code>-UsageLocation FR</code>
  -MailNickName Power Shell <code>-PasswordProfile $PasswordProfile</code>
  -AccountEnabled $true</em></p>
  <p>When I validate the PasswordProfile, I have this error message :</p>
  <p><em>New-AzureADUser: Failed to bind parameter 'PasswordProfile'. Cannot convert value '$PasswordProfile' of type 'System.String to type “Microsoft.Open.AzureAD.Model.PasswordProfile”.</em></p>
  <p>I look in a lot of forum but i can't find any solution to make it works.</p>
  <p>Thanks for your help.</p>
  <p>Geoffrey</p>