I was writing to a file using the node-powershell module: node-powershell
const ps = new Shell({ executionPolicy: 'Bypass', noProfile: true }); ps.addCommand('Start-Process -WindowStyle hidden cmd -Verb RunAs -ArgumentList '/c mkdir "C:\\Program Files\\foo"'');
Yd_ source share