12

I've just granted permissions for a MSA (Managed Service Account) to some resources.

Can I verify it works, by running a cmd.exe process with the credentials of the MSA account, and check I have the proper permissions?

2 Answers 2

16

Possible with Sysinternals' PsExec Tool, with a blank password.

Command example:

PsExec.exe -u domain\MsaAccount$ cmd.exe
2
  • 1
    Thanks, this works! I had to try it a few times. It gave errors like "The system cannot find the file specified." and "The local account store does not contain secret material for the specified account." but on the 3rd attempt the same command worked.
    – EM0
    Feb 4, 2016 at 12:00
  • Also, the managed service needs to be assigned to the computer on which you're running this, otherwise you get "The username or password is incorrect". We use Managed Service Accounts GUI by Cjwdev for this.
    – EM0
    May 12, 2016 at 10:05
5

Skip the password prompt by substituting ~ for the password in powershell.

./psexec -i -u domain\gMSA$ -p ~ notepad.exe
3
  • This command worked with net use. Seems like without -i, the MSA user doesn't have access to the network or some other access error like that. Feb 26, 2021 at 10:02
  • How did you use net use with the msa account. If I input a blank password it's complains about it. Putting a gibberish password also doesn't work.
    – Crust3
    Mar 12, 2021 at 21:47
  • It should be .\psexec instead of ./psexec – Windows, not Linux. I can't make this edit because it's too short.
    – malthe
    Dec 19, 2022 at 12:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .