0

using the following command, I will get the entire user detail from active directory. However, I want all the details populate into hashtable. How to do this.

get-aduser User1234 -server myDomain -properties *

So, if I use the following, I will get this:

$table1 = get-aduser User1234 -server myDomain -properties *
$table1.GetType()

Result: BaseType is Microsoft.ActiveDirectory.Management.ADAccount

It is not hashtable.

Liang Cui
  • 131
  • 1
  • 14
  • http://stackoverflow.com/questions/3740128/pscustomobject-to-hashtable – Mihail Kuznesov Mar 27 '17 at 18:08
  • @Matt, That does it. However, the subject name is little off... Anyway, it seems the answer is really about the `$OneObj.PSObject.Properties.Name` and `$OneObj.PSObject.Properties.Value` as default header for the PSObject. – Liang Cui Mar 27 '17 at 23:54

0 Answers0