Skip to content

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.

How the feature flag cmdlets treat each tier A Preview flag is supported with a caveat; an InDevelopment flag is never something a production administrator needs to turn on. Get-JIMFeature returns Preview flags by default, and InDevelopment flags only with -IncludeInDevelopment. Enable-JIMFeature switches a Preview flag on as it is, but an InDevelopment flag only with -AllowInDevelopment; without it the request is refused with an error naming the flag. Disable-JIMFeature switches either off, with no acknowledgement. Every change is recorded as an audit Activity, and Set-JIMServiceSetting never changes a flag. Preview supported, with a caveat InDevelopment not for production administrators Get-JIMFeature returned by default only with -IncludeInDevelopment Enable-JIMFeature switches it on needs -AllowInDevelopmentrefused without it, withan error naming the flag Disable-JIMFeature switches it off switches it offno acknowledgement needed Each change is an audit Activity; Set-JIMServiceSetting never changes a flag How the feature flag cmdlets treat each tier A Preview flag is supported with a caveat; an InDevelopment flag is never something a production administrator needs to turn on. Get-JIMFeature returns Preview flags by default, and InDevelopment flags only with -IncludeInDevelopment. Enable-JIMFeature switches a Preview flag on as it is, but an InDevelopment flag only with -AllowInDevelopment; without it the request is refused with an error naming the flag. Disable-JIMFeature switches either off, with no acknowledgement. Every change is recorded as an audit Activity, and Set-JIMServiceSetting never changes a flag. Preview supported, with a caveat Get-JIMFeaturereturned by default Enable-JIMFeatureswitches it on Disable-JIMFeatureswitches it off InDevelopment not for production administrators Get-JIMFeatureonly with -IncludeInDevelopment Enable-JIMFeatureneeds -AllowInDevelopmentrefused without it, with an error naming the flag Disable-JIMFeatureswitches it offno acknowledgement needed Each change is an audit Activity; Set-JIMServiceSetting never changes a flag

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

Get-JIMFeature [[-Name] <string>] [-IncludeInDevelopment]

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

List every Preview-tier feature flag
Get-JIMFeature
Include In Development flags (integration harness setup)
Get-JIMFeature -IncludeInDevelopment
Get a single flag by key
Get-JIMFeature -Name "Features.SomeInDevelopmentFeature" -IncludeInDevelopment
List only the flags currently switched on
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

Enable-JIMFeature [-Name] <string> [-AllowInDevelopment] [-PassThru] [-WhatIf] [-Confirm]

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 a Preview-tier feature flag
Enable-JIMFeature -Name "Features.SomePreviewFeature"
Enable an In Development flag, as the integration harness does in scenario setup
Enable-JIMFeature -Name "Features.SomeInDevelopmentFeature" -AllowInDevelopment
Enable a flag and see its new state
Enable-JIMFeature -Name "Features.SomePreviewFeature" -PassThru

Notes

  • Attempting to enable an In Development flag without -AllowInDevelopment produces 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

Disable-JIMFeature [-Name] <string> [-PassThru] [-WhatIf] [-Confirm]

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

Disable a feature flag
Disable-JIMFeature -Name "Features.SomeInDevelopmentFeature"
Disable every flag Get-JIMFeature currently returns
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