(What’s $OFS?)

I’ve spent the two and a half days chasing a bug in my DSC configuration generation.  There was an extra “;`n” getting inserted between each element in the MOF, resulting in invalid configurations.

Turns out I  had changed $OFS in my build script where I modify PSModulePath to point to the Tools directory that the build agent clones from source control (which is a temporary path).  I never set $OFS back and it bit me later on in the configuration generation.

Another takeaway is that if you are relying on a default $OFS value, check it in your script/function/module, as it might have been changed elsewhere!