coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.78k stars 357 forks source link

Implement Group Managed Service Account (gMSA) support #366

Open henryttran opened 5 months ago

henryttran commented 5 months ago

This Pull Request introduces support for Group Managed Service Accounts (gMSA).

To enable Group Managed Service Accounts support, as per the winsw XML configuration file guidelines, the element must be excluded from the configuration.

image https://github.com/winsw/winsw/blob/v3/docs/xml-config-file.md#service-account

Changes:

// Example usage

app.js 

var Service = require('node-windows').Service;
var svc = new Service({
  name:'Hello World',
  script: require('path').join(__dirname,'helloworld.js'),
  allowServiceLogon: true 
});
svc.logOnAs.domain = 'mydomain.local';
svc.logOnAs.account = 'username_$';
svc.logOnAs.gmsa = true;
...
henryttran commented 4 months ago

@coreybutler would you consider merging this? 😄

coreybutler commented 4 months ago

When I get a chance to review it/test it, yes. I'm pretty backlogged right now though.