liveBook · Manning

Fixed parameter

As explained in Practical Automation with PowerShell: Effective scripting from the console to the cloud

A fixed parameter is an input with a predetermined value that cannot be changed by the automation initiator.

A fixed parameter supplies a predetermined value that the person or script initiating automation cannot change. Use it when a setting should remain consistent across executions. section 10.5

When designing virtual machine creation automation, classify each input as mandatory, fixed, optional, or logical. Fixed values simplify the interface and prevent unnecessary variation. section 10.5

Disabling automatic checkpoints

Set automatic checkpoints to a fixed disabled value when they should never be created during virtual machine provisioning. If requirements change, enable them manually after creation rather than exposing the setting to every automation caller. section 10.5

Figure 10.2 Hyper-V virtual machine creation parameters broken down into buckets for mandatory (values that must be supplied), optional (values that have a default value but can be overwritten by the user), fixed (values that are hardcoded), and logical (values that are determined by logic in the script)

Compare fixed parameters with mandatory, optional, and logical values when deciding which virtual machine settings callers can control. section 10.5

How Practical Automation with PowerShell: Effective scripting from the console to the cloud covers it

How deep it goes
Defines fixed values and contrasts them with three parameter categories, but does not detail implementation syntax.
Examples
Uses automatic checkpoint disablement as the fixed-value example in Hyper-V virtual machine creation.
What it assumes
Assumes familiarity with automation inputs and virtual machine provisioning while defining parameter categories explicitly.
What you can do after
Configure automation by hardcoding settings that should remain unavailable to callers.
How it connects
Connects fixed parameters with mandatory parameters, optional parameters, logical parameters, and virtual machine creation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Practical Automation with PowerShell: Effective scripting from the console to the cloud. The section links point to the parts of the book it draws on.