UPDATE: XKCD Password Generator

This is a follow-up to my post yesterday, that you can find here. /u/da_chicken had pointed out that Get-Random used System.Random which wasn’t appropriate for a password generator so after some research and a fair amount of frustration I’ve got this to work using System.Security.Cryptography.RNGCryptoServiceProvider. I only used this for the lengths and word selection […]

Beginner: Understanding Parameter Sets

Hi! I’m running into a problem with parameter sets. What I want, are two parameter sets: Set 1: -Source [-Output] [-Bitrate] Set 2: -Source -RecommendedFontSize This example code achieves it: function Test { [CmdletBinding(DefaultParameterSetName = “Main”)] param( [Parameter(Mandatory, ParameterSetName = “Main”)] [Parameter(Mandatory, ParameterSetName = “Recommendation”)] [string] $Source, [Parameter(ParameterSetName = “Main”)] [string] $Output, # [Parameter(HelpMessage = […]