-
Notifications
You must be signed in to change notification settings - Fork 128
ApplyingMofToEndpoints
This page explains how to apply a compiled .mof file using PowerShell DSC and Start-DscConfiguration.
Before applying a MOF, confirm the following:
- The MOF has already been compiled (for example,
localhost.mofor<ComputerName>.mof). - The target machine has the required DSC resources installed (for example,
PowerSTIG,PSDscResources). - You are running PowerShell as Administrator.
- WinRM is enabled and reachable for remote application scenarios.
Screenshot placeholder:
[Screenshot: Prerequisites / module versions installed]
Example compile output path:
C:\temp\mof
Example contents:
-
localhost.moffor local application -
<NodeName>.moffor node-targeted application
Screenshot placeholder:
[Screenshot: Folder showing generated MOF file(s)]
Use Start-DscConfiguration against the folder containing the MOF.
Start-DscConfiguration -Path 'C:\temp\mof' -Wait -Verbose -ForceParameter notes:
-
-Pathpoints to the folder containing the MOF. -
-Waitkeeps the command attached until completion. -
-Verboseshows progress details for troubleshooting. -
-Forceoverwrites any pending configuration if needed.
Screenshot placeholder:
[Screenshot: Start-DscConfiguration local run with verbose output]
If your configuration contains a Node block, the MOF is named after the node.
Example:
Server01.mof
When applying from the target machine itself, run:
Start-DscConfiguration -Path 'C:\temp\mof' -Wait -Verbose -ForceDSC automatically picks the MOF matching the local node name.
After application, verify current state:
Get-DscConfigurationStatusTo view the currently applied configuration details:
Get-DscConfigurationScreenshot placeholder:
[Screenshot: Get-DscConfigurationStatus result]
Start-DscConfiguration can push configurations to remote endpoints using CIM sessions.
$session = New-CimSession -ComputerName 'Server01'
Start-DscConfiguration -Path 'C:\temp\mof' -CimSession $session -Wait -Verbose -ForceNotes:
- The MOF file name must align with the target node name.
- Required DSC resources must exist on the remote endpoint.
- Network and WinRM access must be configured correctly.
Screenshot placeholder:
[Screenshot: Remote Start-DscConfiguration with CimSession]
Symptom: Error indicates a required resource/module cannot be found.
Fix:
- Install missing modules (for example,
PowerSTIG,PSDscResources) on the target endpoint. - Confirm module versions match those referenced in the configuration.
Symptom: Unable to connect to target endpoint.
Fix:
- Run as Administrator.
- Validate WinRM connectivity and firewall rules.
- Confirm credentials and endpoint access policy.
Symptom: DSC cannot find a matching configuration document.
Fix:
- Confirm MOF exists in the folder passed to
-Path. - Confirm node name in MOF matches target endpoint name.
- Compile configuration to MOF.
- Validate module/resource presence on target endpoint.
- Apply with
Start-DscConfiguration -Verbose -Wait. - Verify with
Get-DscConfigurationStatus. - Record output and results for change tracking/audit.
# Apply configuration
Start-DscConfiguration -Path 'C:\temp\mof' -Wait -Verbose -Force
# Check last run status
Get-DscConfigurationStatus
# View current config state
Get-DscConfiguration
# View available DSC resources
Get-DscResource-
Stig Coverage
- Stig Coverage Summary
- Adobe-AcrobatPro-2.1
- Adobe-AcrobatReader-1.6
- Adobe-AcrobatReader-2.1
- DotNetFramework-4-2.6
- DotNetFramework-4-2.7
- FireFox-All-6.6
- FireFox-All-6.7
- Google-Chrome-2.10
- Google-Chrome-2.11
- IISServer-10.0-3.5
- IISServer-10.0-3.6
- IISSite-10.0-2.13
- IISSite-10.0-2.14
- InternetExplorer-11-2.5
- InternetExplorer-11-2.6
- MS-Edge-2.3
- MS-Edge-2.4
- Office-365ProPlus-3.3
- Office-365ProPlus-3.4
- Office-Access2016-1.1
- Office-Access2016-2.1
- Office-Excel2016-1.2
- Office-Excel2016-2.2
- Office-OneNote2016-1.2
- Office-OneNote2016-2.1
- Office-Outlook2016-2.3
- Office-Outlook2016-2.4
- Office-PowerPoint2016-1.1
- Office-PowerPoint2016-2.1
- Office-Publisher2016-1.3
- Office-Publisher2016-2.1
- Office-Skype2016-1.1
- Office-Skype2016-2.1
- Office-System2016-2.4
- Office-System2016-2.5
- Office-Word2016-1.1
- Office-Word2016-2.1
- OracleLinux-8-2.3
- OracleLinux-8-2.4
- OracleLinux-9-1.1
- RHEL-7-3.14
- RHEL-7-3.15
- RHEL-9-2.3
- RHEL-9-2.7
- SqlServer-2016-Instance-3.5
- SqlServer-2016-Instance-3.6
- SqlServer-2022-Instance-1.2
- SqlServer-2022-Instance-1.3
- Ubuntu-18.04-2.14
- Ubuntu-18.04-2.15
- WindowsClient-10-3.5
- WindowsClient-10-3.6
- WindowsClient-11-2.5
- WindowsClient-11-2.6
- WindowsDefender-All-2.6
- WindowsDefender-All-2.7
- WindowsDnsServer-2012R2-2.5
- WindowsDnsServer-2012R2-2.7
- WindowsFirewall-All-2.1
- WindowsFirewall-All-2.2
- WindowsServer-2016-DC-2.10
- WindowsServer-2016-DC-2.9
- WindowsServer-2016-MS-2.10
- WindowsServer-2016-MS-2.9
- WindowsServer-2019-DC-3.6
- WindowsServer-2019-DC-3.7
- WindowsServer-2019-MS-3.6
- WindowsServer-2019-MS-3.7
- WindowsServer-2022-DC-2.6
- WindowsServer-2022-DC-2.7
- WindowsServer-2022-MS-2.6
- WindowsServer-2022-MS-2.7