New-Object ArgumentList parameter should be a hashtable instead object array - by Peter M10

Status : 


Sign in
to vote
ID 842343 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 3/28/2014 2:35:12 AM
Access Restriction Public


This is only a minor suggestion - if the ArgumentList parameter of New-Object would accept a hashtable the role of the arguments would be clearer and order  wouldn't matter like so:

New-Object -TypeName PSCredential @{UserName = "admin"; Password=$PwSec }
Sign in to post a comment.