1

I want to run cmd.exe not as administrator, but as the local system account on Windows 11.

Apparently it was possible on Windows 10 using psexec. On Windows 11 with psexec v2.40 I get this error from an admin elevated cmd.exe:

C:\WINDOWS\system32>psexec64 -i -s cmd.exe

PsExec v2.4 - Execute processes remotely Copyright (C) 2001-2022 Mark Russinovich Sysinternals - www.sysinternals.com

Error creating key file on system3: Access is denied.

edit:

Tried also on one of my Windows 10 clients, and it doesn't work either anymore.

Casady
  • 111
  • 2
  • A good question, but why post it on Server Fault? Windows 11 is not really a server OS... – Robert Sep 15 '22 at 20:14
  • I'm the admin on a Windows Server 2022 and have a nasty problem on one of my client installations where a file cannot be deleted. It's not locked. Tried also to delete it during boot and also safe mode. The last solution I had in my bag of tricks was psexec, but apparently it doesn't work. Btw, tried it now on a Windows 10 client, with the same error. – Casady Sep 15 '22 at 20:27

1 Answers1

0

Found a solution. PsExec doesn't work anymore for this task. Downgrading to 2.20, as some forum posts suggested didn't work either.

But this freeware tools does still work. You can launch a powershell as system user:

https://www.nirsoft.net/utils/advanced_run.html

I was able to delete the 'undeletable' file this way.

Casady
  • 111
  • 2