Home Dashboard Directory Help
Search

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


Status: 

Active


1
0
Sign in
to vote
Type: Suggestion
ID: 842343
Opened: 3/28/2014 2:35:12 AM
Access Restriction: Public
0
Workaround(s)
view

Description

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 }
Details
Sign in to post a comment.
Sign in to post a workaround.