Skip to content

GetVersionInfo

Michael Rasmussen edited this page Feb 27, 2026 · 2 revisions

Working with Versions in PowerSTIG

PowerSTIG workflows usually involve tracking two version values:

  • The installed PowerSTIG module version
  • The STIG version used by a DSC resource (for example, WindowsClient)

Why Version Alignment Matters

PowerSTIG includes multiple STIG versions for each supported resource. For Windows 11, for example, you may see more than one available STIG version (such as v2.5 and v2.6).

By default, processed STIG files are located under:

C:\Program Files\WindowsPowerShell\Modules\PowerSTIG\4.29.0\StigData\Processed

In that folder, each supported product appears with available STIG versions.

PowerStig DSC Resource Versions

Example: Module Version + STIG Version

Configuration Windows11
{
    Import-DscResource -ModuleName PowerStig -ModuleVersion 4.29.0

    WindowsClient Win11-Baseline
    {
        StigVersion = "2.5"
        OsVersion   = "11"
    }
}

. Windows11 -OutputPath "c:\temp"

This example uses PowerSTIG module version 4.29.0 and targets Windows 11 STIG v2.5.

Find Installed PowerSTIG Module Versions

Run:

Get-Module -Name PowerSTIG -ListAvailable

Output example:

PowerStig Module Versions

You may see multiple versions installed side-by-side.

Query Resource Names and STIG Versions

Step 1: List Available DSC Resource Names

Run:

Get-DscResource -Module PowerStig

Output example:

PowerStig DSC Resource Names

Step 2: List Available STIG Versions for a Resource

Run:

Import-Module -Name PowerStig
Get-Stig -Technology WindowsClient

Output example:

PowerStig DSC Resource Versions

This output shows available STIG versions for Windows Client (for example, Windows 10 and Windows 11 entries).

Example Configuration

Configuration Windows11
{
    Import-DscResource -ModuleName PowerStig -ModuleVersion 4.29.0

    WindowsClient Win11Baseline
    {
        StigVersion = "2.5"
        OsVersion   = "11"
    }
}

. Windows11 -OutputPath "c:\temp"

Configuration Syntax Reference

  • Configuration - Required PowerShell keyword.
  • Windows11 - Arbitrary configuration name. You invoke this name like a function to compile the MOF.
  • WindowsClient - PowerSTIG DSC resource name used in this example.
  • Win11Baseline - Arbitrary instance name for the WindowsClient resource block.
  • StigVersion - STIG data version used for the resource (aligned with DISA release versions).
  • OsVersion - Resource property that specifies the target operating system version.

Clone this wiki locally