Christian Crowhurst

Results 34 comments of Christian Crowhurst

How about this: ``` powershell function Set-Something { [CmdletBinding()] param() try { # trigger error 1 / (1 - 1) # this line will NEVER run regardless of caller's preferences...

Hi Kevin, What I don't like about using `$PSCmdlet.ThrowTerminatingError($PSItem)` as you suggest - it seems to make `-ErrorAction 'Stop'` not behave as I would expect. Take the following function: ```...

I think my original template can be improved and simplified: ``` powershell function Set-Something { [CmdletBinding()] param() process { $callerEA = $ErrorActionPreference try { # functions work goes here }...

As there's a bit more interesting conversation on this one, I thought I'd throw out what I've been using in a bunch of modules I've written lately. ``` powershell function...

It might help the conversation by giving an example of the code I would write in the body of the function: ``` powershell function Set-Something { [CmdletBinding()] param ( [string]...

@KirkMunro, while you're at it can you add the equivalent of [npm shrinkwrap/package-locks](https://docs.npmjs.com/files/package-locks) to PowerShell Core ;-) [PsDepend](https://github.com/RamblingCookieMonster/PSDepend) get's someway toward package-locks but as per [this issue](https://github.com/RamblingCookieMonster/PSDepend/issues/25) doesn't handle transitive...

Looks like this feature should also accommodate being able to specify the version of a dependency that should be installed, overriding the PS default behaviour of installing the latest version...

I'd be interested in being included in that conversation, if only to hear what others say. Brok you've kindly discussed MR maintenance with me and although I've been rubbish at...

`MembershipRebootConfiguration.AllowLoginAfterAccountCreation` is probably the closest thing in MR that currently supports an approval process. `RequireAccountApproval` that I propose above would be used _instead_ to prevent the login until the account...

I would also be _tempted_ to rename `IsLoginAllowed` -> `IsLocked`. I won't of course as it would be a big breaking change. Instead I'll add a summary xml comment to...