Something I Should Have Done a While Ago: $continue
$ErrorActionPreference is your friend. However, ‘SilentlyContine’ isn’t, especially when it’s misspelled as is this case. If we could Tab-complete it, that’d be great.
Hey….
I’ve added this to my $PROFILE (actually my CommonFunctionLibrary.psm1 from my RDP-friendly Profile System)
$Continue = ‘Continue’;
$SilentlyContinue= ‘SilentlyContinue’;
$Stop = ‘Stop’;
$Inquire = ‘Inquire’;
$Ignore = ‘Ignore’;
$Suspend = ‘Suspend’;
Set-Variable Continue, SilentlyContinue, Stop, Inquire, Ignore, Suspend –Option ReadOnly
For interested parties, these strings are an Enum, [System.Management.Automation]::ActionPreference and can be displayed as follows:
[Enum]::GetNames([System.Management.Automation.ActionPreference]);
Comments
- Anonymous
May 22, 2014
[Enum]::GetNames([System.Management.Automation.ActionPreference]) | % { Set-Variable -Name $_ -Value $_ ; }