Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

"Hashtable-to-Object conversion"? geeze, not that

$
0
0

Hi Folks,

I have been away from regular use of PowerShell for a while, and now that I am back, I seem to have forgotten everything!  Reading from a CSV file:

$in=import-csv $InFile 

ForEach ( $address in $in ) { Get-User -Identity $address}

Cannot convert value "@{address=alias}" to type "Microsoft.Exchange.Configuration.Tasks.UserIdParameter". Error: "Cannot convert hashtable to an object of the following type: Microsoft.Exchange.Configuration.Tasks.UserIdParameter. Hashtable-to-Object conversion is not supported in restricted language mode or a Data section."

This is a *trivial* issue and I am sure I am just overlooking something, but what?  How to extract the value of "alias" from the hash?  

Thanks for any help.

--Joe


Viewing all articles
Browse latest Browse all 6937

Trending Articles