< Back
Register-PSFFeature
Post
NAME Register-PSFFeature
SYNOPSIS
Registers a feature for use in the PSFramework Feature Flag System.
SYNTAX
Register-PSFFeature [-Name] <String> [[-Description] <String>] [-NotGlobal] [-NotModuleSpecific] [[-Owner]
<String>] [<CommonParameters>]
DESCRIPTION
Registers a feature for use in the PSFramework Feature Flag System.
This allows offering a common interface for enabling and disabling features on-demand.
Typical use-cases:
- Experimental Features
- Reverting breaking behavior on a per-module basis.
PARAMETERS
-Name <String>
The name of the feature to register.
Feature names are scoped globally, so please prefix by your own module's name.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Description <String>
A description of the feature, so users can discover what it is about.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-NotGlobal [<SwitchParameter>]
Disables global flags for this feature.
By default, features can be enabled or disabled on a global scope.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-NotModuleSpecific [<SwitchParameter>]
Disables module specific feature flags.
By default, individual modules can override the global settings either way.
This may not really be applicable for all features however.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Owner <String>
The name of the module owning the feature.
Autodiscovery is attempted, but it is recommended to explicitly specify the owning module's name.
Required? false
Position? 3
Default value (Get-PSCallStack)[1].InvocationInfo.MyCommand.ModuleName
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Register-PSFFeature -Name 'MyModule.DividebyZeroExp' -Description 'Attempt to divide by zero' -Owner
MyModule
Registers the feature under its owning module and adds a nice description.
RELATED LINKS
SYNOPSIS
Registers a feature for use in the PSFramework Feature Flag System.
SYNTAX
Register-PSFFeature [-Name] <String> [[-Description] <String>] [-NotGlobal] [-NotModuleSpecific] [[-Owner]
<String>] [<CommonParameters>]
DESCRIPTION
Registers a feature for use in the PSFramework Feature Flag System.
This allows offering a common interface for enabling and disabling features on-demand.
Typical use-cases:
- Experimental Features
- Reverting breaking behavior on a per-module basis.
PARAMETERS
-Name <String>
The name of the feature to register.
Feature names are scoped globally, so please prefix by your own module's name.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Description <String>
A description of the feature, so users can discover what it is about.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-NotGlobal [<SwitchParameter>]
Disables global flags for this feature.
By default, features can be enabled or disabled on a global scope.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-NotModuleSpecific [<SwitchParameter>]
Disables module specific feature flags.
By default, individual modules can override the global settings either way.
This may not really be applicable for all features however.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Owner <String>
The name of the module owning the feature.
Autodiscovery is attempted, but it is recommended to explicitly specify the owning module's name.
Required? false
Position? 3
Default value (Get-PSCallStack)[1].InvocationInfo.MyCommand.ModuleName
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Register-PSFFeature -Name 'MyModule.DividebyZeroExp' -Description 'Attempt to divide by zero' -Owner
MyModule
Registers the feature under its owning module and adds a nice description.
RELATED LINKS