-
Notifications
You must be signed in to change notification settings - Fork 128
GetVersionInfo
Michael Rasmussen edited this page Feb 27, 2026
·
2 revisions
PowerSTIG workflows usually involve tracking two version values:
- The installed PowerSTIG module version
- The STIG version used by a DSC resource (for example,
WindowsClient)
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.
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.
Run:
Get-Module -Name PowerSTIG -ListAvailableOutput example:
You may see multiple versions installed side-by-side.
Run:
Get-DscResource -Module PowerStigOutput example:
Run:
Import-Module -Name PowerStig
Get-Stig -Technology WindowsClientOutput example:
This output shows available STIG versions for Windows Client (for example, Windows 10 and Windows 11 entries).
Configuration Windows11
{
Import-DscResource -ModuleName PowerStig -ModuleVersion 4.29.0
WindowsClient Win11Baseline
{
StigVersion = "2.5"
OsVersion = "11"
}
}
. Windows11 -OutputPath "c:\temp"-
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 theWindowsClientresource block. -
StigVersion- STIG data version used for the resource (aligned with DISA release versions). -
OsVersion- Resource property that specifies the target operating system version.