title: Net User $userName /domain
body: <p>I am trying to create a module for our support team which will contain some tools we use on daily basis but we used CMD until now.</p>
  
  <p>One of the commands we use is <code>net user $username /domain</code> in order to check if the user's password has expired and all the other useful details the command output.</p>
  
  <p>I tried to put that command in a function like this:</p>
  
  <pre><code>function Get-UserDetails {
      [CmdletBinding()]
      Param(
          [Parameter(Mandatory=$true)]
          [string]$UserName
      )
      net user $UserName /domain
  }
  </code></pre>
  
  <p>The function works fine but I want to filter the output for a few details only.
  The problem is that <code>net user</code> is not a PowerShell cmdlet and it <strong>has no properties</strong> so I cant select any of it.</p>
  
  <p>So my questions is:</p>
  
  <p>Do you know a better way to get all that data in one command? because the <code>Get-ADUser</code> outputs less data then <code>net user</code>.</p>