Feature Flags¶
Cmdlets for viewing and toggling JIM's Preview features. Feature flags are stored as Service Settings under the hood, but change only through these cmdlets (or the equivalent REST endpoints), never through Set-JIMServiceSetting.
Info
A feature flag has a tier: Preview (returned by default, supported with a caveat) or InDevelopment (returned only with -IncludeInDevelopment, never something a production administrator needs to turn on).
Get-JIMFeature¶
Retrieves feature flags. Returns every Preview-tier flag by default; specify -IncludeInDevelopment to also return In Development flags, and -Name to filter to a single flag by key.
Syntax¶
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Name |
string |
No | The key of the one flag to return, such as "Features.SomeInDevelopmentFeature". Can be given by position, as the first argument. | |
IncludeInDevelopment |
switch |
No | Also returns In Development flags. Intended for development and the integration harness; enabling one outside Development still requires -AllowInDevelopment on Enable-JIMFeature. |
Output¶
Each feature flag.
| Property | Type | Description |
|---|---|---|
Key |
string |
The flag's key, e.g. "Features.SomeInDevelopmentFeature". |
DisplayName |
string |
Human-readable display name. |
Description |
string |
What the flag controls. |
Tier |
string |
The flag's tier: "Preview" (visible to administrators) or "InDevelopment" (developers only). |
TrackingIssueNumber |
int |
The GitHub issue tracking removal of this flag once the feature it gates ships. |
Enabled |
bool |
Whether the flag is currently enabled. |
LastUpdated |
datetime |
When the flag was last changed, or empty if never changed from its seeded default. |
LastUpdatedByName |
string |
The display name of the principal that last changed the flag, or empty if never changed. |
Examples¶
Get-JIMFeature -Name "Features.SomeInDevelopmentFeature" -IncludeInDevelopment
Get-JIMFeature -IncludeInDevelopment | Where-Object { $_.Enabled }
Enable-JIMFeature¶
Switches a feature flag on. Enabling an In Development flag requires -AllowInDevelopment; without it, the server refuses the request. Supports ShouldProcess; use -WhatIf or -Confirm to preview or confirm the operation.
Syntax¶
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Name |
string |
Yes | The key of the flag to enable, such as "Features.SomeInDevelopmentFeature". A flag piped from Get-JIMFeature binds by its Key. Can be given by position, as the first argument. Accepts pipeline input by property name, Name or Key. |
|
AllowInDevelopment |
switch |
No | Required to enable an In Development flag; the integration harness uses it in scenario setup. A Preview-tier flag needs no such acknowledgement. | |
PassThru |
switch |
No | Returns the feature flag as updated. |
Output¶
With -PassThru, the feature flag as updated; otherwise nothing.
Properties as under Get-JIMFeature.
Examples¶
Enable-JIMFeature -Name "Features.SomeInDevelopmentFeature" -AllowInDevelopment
Notes¶
- Attempting to enable an In Development flag without
-AllowInDevelopmentproduces a non-terminating error naming the flag. - Each successful change creates an audit activity, in the same Configuration Change History as any other Service Setting change.
Disable-JIMFeature¶
Switches a feature flag off. Disabling never requires acknowledgement, whatever the flag's tier. Supports ShouldProcess; use -WhatIf or -Confirm to preview or confirm the operation.
Syntax¶
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Name |
string |
Yes | The key of the flag to disable, such as "Features.SomeInDevelopmentFeature". A flag piped from Get-JIMFeature binds by its Key. Can be given by position, as the first argument. Accepts pipeline input by property name, Name or Key. |
|
PassThru |
switch |
No | Returns the feature flag as updated. |
Output¶
With -PassThru, the feature flag as updated; otherwise nothing.
Properties as under Get-JIMFeature.
Examples¶
Get-JIMFeature -IncludeInDevelopment | Disable-JIMFeature
Notes¶
- Each successful change creates an audit activity.
See also¶
- Preview Features: what a Preview feature is, and where to turn one on in the portal
- Service Settings: the underlying store, and why the generic Service Settings cmdlets refuse feature-flag keys
- Activities: viewing audit activities created by flag changes