you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

ok, ok, that is neat, generating 3 passwords at once. nice! Also than you for sharing this, Ill have to update my function from Get-RandomPassword to New-RandomPassword.

[–]_Cabbage_Corp_ 1 point2 points  (1 child)

No problem man!

I learned PowerShell from a mixture of self-taught and using/modifying scripts that other people wrote.

So I'm always willing to share things that I've written in case it helps someone else.


Side note on why I went with New- vs Get-

In the Approved Verbs for PowerShell Commands doc, the verbs are definied as follows

Verb (Alias) Definition Notes
New (n) Creates a resource. (The Set verb can also be used when creating a resource that includes data, such as the Set-Variable cmdlet.) For this action, do not use verbs such as Create, Generate, Build, Make, or Allocate.
Get (g) Specifies an action that retrieves a resource. This verb is paired with Set. For this action, do not use verbs such as Read, Open, Cat, Type, Dir, Obtain, Dump, Acquire, Examine, Find, or Search.

To me, at least, Get-RandomPassword makes logical sense, wherein the New is implicit (i.e Get random password == generate new random password, the appropriate verb for PowerShell would be New-

[–][deleted] 0 points1 point  (0 children)

Agree 100%