AuditPolicyDsc icon indicating copy to clipboard operation
AuditPolicyDsc copied to clipboard

AuditPolicyDsc: Import of audit policy csv fails on a white space in the path

Open tk185059 opened this issue 2 years ago • 0 comments

If the path to the audio policy csv file contains a white space, the auditpol fails.

Details of the scenario you tried and the problem that is occurring

N/A

Verbose logs showing the problem

No useful information, only Failed import of {0} and then Succeeded import of {0}

Suggested solution to the issue

I can send a pull request

The DSC configuration that is used to reproduce the issue (as detailed as possible)

$PolicyPath = "C:\Staging\Sources\LGPO\Workstation{8DAC5568-F21D-4FB7-A9DC-88290CE6F099}\DomainSysvol\GPO\Machine\microsoft\windows nt\Audit\audit.csv" AuditPolicyCsv auditPolicy { IsSingleInstance = 'Yes' CsvPath = "$PolicyPath\audit.csv" }

The operating system the target node is running

OsName : Microsoft Windows 11 IoT Enterprise OsOperatingSystemSKU : 188 OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 22000.1.amd64fre.co_release.210604-1628 OsLanguage : en-US OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

PSVersion 5.1.22000.282 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22000.282 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

master 1.4.0.0

tk185059 avatar Apr 22 '22 11:04 tk185059