Home » Microsoft » 70-765 » Which cmdlet should you run first?
You have Microsoft SQL Server on a Microsoft Azure virtual machine.
You have two Windows accounts named serviceAccount1 and ServiceAccount2. The SQL Server Agent runs as ServiceAccount1.
You need to run SQL Server Agent job steps by using ServiceAccount2.
Which cmdlet should you run first?
A. Set-ADServiceAccount
B. Set-SqlCredential
C. New-ADServiceAccount
D. New-SqlCredential
Correct Answer: C
Explanation/Reference:
Explanation:
The New-ADServiceAccount command creates a new Active Directory managed service account or group managed service account object.
Incorrect Answers:
A: The Set-ADServiceAccount cmdlet modifies the properties of an Active Directory managed service account (MSA). You can modify commonly used property values by using the cmdlet parameters.
B: The Set-SqlCredential cmdlet sets the Identity and password properties for a SQL Credential object using this cmdlet.
D: The New-SqlCredential cmdlet creates a new SQL Server credential object. A SQL Server credential object is used to store authentication information. The SQL Server credential is required when backing up to or restoring from the Windows Azure storage service, and is used to store the Windows Azure storage account name and access key information.
References: https://docs.microsoft.com/en-us/powershell/module/addsadministration/new-adserviceaccount?view=win10-ps