.net - How can I programmatically install a system service using c# to use a Group Managed Service Account (gMSA)? -


i deploying company's system in new environment, , out group has given me list of service accounts use each of our system services. however, they've told me accounts group managed service accounts (or gmsas short) , there no passwords since managed "key distribution service".

i have not worked gmsas before, source our installers quite simple, it's not working due lack of passwords.

var process = new serviceprocessinstaller() {     account = serviceaccount.user,     username = <username>,     password = <password>, }; var service = new serviceinstaller() {     servicename = <code_name>,     displayname = <pretty_name>, }; service.servicesdependedon = <dependencies>; service.starttype = servicestartmode.automatic; service.delayedautostart = true;  installers.add(process); installers.add(service); base.install(statesaver); 

how can modify service installers use gmsa when no password given. (or user admin rights) installing services manually.

i able solve problem; there couple of things needed change.

first, username of account needed suffixed $, instead of domain\sysuser domain\sysuser$.

next, had use null password instead of string.empty.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -