Comments (4)
@erjenkin -- thanks so much for testing that out. I think I figured out what the problem is.
The only other PS module I'd installed aside from PowerSTIG was SqlServer, which I needed it to run another piece of software that assesses STIG compliance. It looks like the presence of the SqlServer
module was causing the behavior I documented.
To test:
- I compiled your example config.
- I deleted the
SqlServer
module from my PS modules folder, then applied the example config. The DSC configuration was applied successfully. - I copied the
SqlServer
module back into my PS modules folder, removed the config and stopped the DSC process using the snippet below, then re-applied your example config. It generated the exception I logged in my previous post (screenshot below).
Remove-DscConfigurationDocument -Stage Current,Pending,Previous -Verbose -Force
###
### Find the process that is hosting the DSC engine
###
$CimParameters = @{
ClassName = 'Msft_Providers'
Filter = "provider='dsctimer' OR provider='dsccore'"
}
$dscProcessID = Get-CimInstance @CimParameters |
Select-Object -ExpandProperty HostProcessIdentifier
###
### Stop the process
###
Get-Process -Id $dscProcessID | Stop-Process
- I removed the config and stopped the DSC process once again using the snippet, deleted the
SqlServer
module from my PS modules folder, then re-applied your example config. The DSC configuration was applied successfully once again.
I'm not sure why the presence of the SqlServer
module is causing this behavior, but it seems to be responsible.
from powerstig.
I would assume you are missing the audit directory based on that rule. Can you try to use the whole dsc config from that example? The path needs to be "'C:\Audits'
configuration Example
{
param
(
[parameter()]
[string]
$NodeName = 'localhost'
)
Import-DscResource -ModuleName PowerStig
Node localhost
{
File SqlAudit
{
Ensure = "Present"
Type = "Directory"
DestinationPath = "C:\Audits"
}
SqlServer BaseLine
{
SqlVersion = '2016'
SqlRole = 'Instance'
ServerInstance = 'SQL2019onServer'
}
}
}
Example
from powerstig.
I'm not sure that's it -- I had manually created the C:\Audits
directory previously.
I also deleted the directory and then ran the example config with the additional File
block to ensure the C:\Audits
dir is present. After starting this configuration, I see that C:\Audits
has been created, but I still see the aforementioned exception for each of the SqlScriptQueryRule
entities.
Is there anything else I might be missing?
from powerstig.
Just deployed SQL2019 on Server 2019 and the configuration passes - with the exception of one rule - V-213975 - guessing because this option does not exist on SQL2019
After skipping that single rule, the configuration applies.
from powerstig.
Related Issues (20)
- Update Powerstig to parse\apply SQL_Server_2016_Database_STIG_V2R7
- Update PowerSTIG to Parse/Apply U_RHEL_7_V3R14_STIG
- Update Powerstig to parse\apply U_Google_Chrome_V2R9_STIG
- Update Powerstig to parse\apply U_CAN_Ubuntu_18-04_LTS_V2R13_STIG
- Update Powerstig to parse\apply U_MS_SQL_Server_2016_Instance_V2R11_Manual_STIG
- Update PowerSTIG to Parse/Apply Internet Explorer 11 V2R5
- Update PowerSTIG to Parse/Apply Microsoft Defender V2R5 HOT 1
- Update PowerSTIG to Parse/Apply Microsoft .NET 4 V2R2
- Update PowerSTIG to Parse/Apply Microsoft Defender Antivirus STIG Benchmark V2R5
- Invalid value for V-221588 in default Chrome organizational settings HOT 1
- Bad or misconfigured link to PowerStig.Document HOT 2
- Update PowerSTIG to Parse/Apply Oracle Linux 8 V1R9
- PowerStig 4.19.0 & above - File not found - Rule.Skipped\SkippedRule.psm1 because it does not exist. HOT 6
- Windows Fire Wall STIG is preventing GEN 2 VM RDP Connection. HOT 1
- Update PowerSTIG to Parse/Apply Microsoft Windows Server 2022 STIG - Ver 1, Rel 5
- Update PowerSTIG to Parse/Apply Microsoft Windows Server 2019 STIG - Ver 2, Rel 9
- Update PowerSTIG to Parse/Apply Microsoft Windows Server 2016 STIG - Ver 2, Rel 8
- Update PowerSTIG to Parse/Apply Microsoft Windows 11 STIG - Ver 1, Rel 6
- Update PowerSTIG to Parse/Apply Microsoft Windows 10 STIG - Ver 2, Rel 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerstig.