title: PowerShell 5.0 create variable of type Microsoft.SqlServer.Management.Smo.SqlDataType NVarCharMax
body: <p>I cannot find the right syntax to create a variable of this type.</p>
  <pre><code>[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Management.SMO')
  
  $test2 = New-Object DataType(Microsoft.SqlServer.Management.Smo.SqlDataType NVarCharMax)
  $test2.GetType().Name
  </code></pre>
  <p>Above results in an error</p>