gaelcolas / DscBuildHelpers

10 stars 7 forks source link

Get-DscSplattedResource fails when the ExecutionName contains spaces #7

Closed ykuijs closed 1 year ago

ykuijs commented 4 years ago

When the ExecutionName contains spaces (or special characters like "()" which results in a subexpression), invoking the code generated by Get-DscSplattedResource results in an error:

PSDesiredStateConfiguration\Configuration : At line:6 char:31
+  Firewall Firewall_SharePoint Web Ports {
+                               ~~~
Unexpected token 'Web' in expression or statement.

This can easily be resolved if quotes are placed around the ExecutionName in the generated code block.

ykuijs commented 1 year ago

Fixed in PR #10