2 issues have been filed against the DSC module that pertain to Nano server:
- The -Sta switch is not available as a command line param to powershell.exe - https://github.com/puppetlabs/puppetlabs-dsc/issues/197
- The .NET method WaitHandle.WaitOne doesn't have a method with 2 params in the CoreCLR, which is what powershell.exe runs on for Nano Server - https://github.com/puppetlabs/puppetlabs-dsc/issues/198 / calling code at https://github.com/puppetlabs/puppetlabs-dsc/blob/ed55b0a17be855ec3b236f8962f98b1fc3168736/lib/puppet_x/puppetlabs/powershell_manager.rb#L52
Looking at the commit history, the PowerShell module didn't historically use -Sta per https://github.com/puppetlabs/puppetlabs-powershell/blob/88c03084d2a6af4d853d01254255d8a87b117ccc/lib/puppet/provider/exec/powershell.rb#L67. It appears picked up its command line parameters from the work done on the DSC module. The DSC module had -Sta added in https://github.com/puppetlabs/puppetlabs-dsc/commit/86e42ec50acb894c6ed137d33d6da00d23266675 and there is no explanation as to why. It might have been added while trying to avoid entering a deadlock in what was poorly written threading code; the issue was later resolved, and -Sta probably should have been removed.
According to the .NET docs for WaitHandle.WaitOne(millisecondsTimeout):
Calling this method overload is the same as calling the WaitOne(Int32, Boolean) overload and specifying false for exitContext.