Your network contains an Active Directory domain named contoso.com. The domain contains a
server named Server1.Server1 runs Windows Server 2012 R2.
You create a group Managed Service Account named gservice1.
You need to configure a service named Service1 to run as the gservice1 account.
How should you configure Service1?
A.
From Services Console configure the recovery settings
B.
From a command prompt, run sc.exe and specify the config parameter
C.
From Windows PowerShell, run Set-Service and specify the -PassThrough parameter
D.
From a command prompt, run sc.exe and specify the sdset parameter
Explanation:
Sc config, Modifies the value of a service’s entries in the registry and in the Service Control Manager
database.
obj= {<AccountName> | <ObjectName>}
Specifies a name of an account in which a service will run, or specifies a name of the Windows driver
object in
which the driver will run. The default setting is LocalSystem.
password= <Password>
Specifies a password. This is required if an account other than the LocalSystem account is used.
Answer appears correct –
Using PS you must specify sc.exe as sc is an alias for Set-Content and will not work
PS>sc.exe config “[servicename]” obj= “[.\username]” password= “[password]”
CMD>sc config “[servicename]” obj= “[.\username]” password= “[password]”
FYI .\username is an alias to the local machine and can be changed to domain\username
” marks are optional as far as I can work out on my home lab server
https://technet.microsoft.com/en-gb/library/cc990290.aspx