tried what you said and now get the same error message as with command prompt.
If you are entering sc.exe you would not be seeing a message that starts with Set-Content... So, what is the exact message that you are seeing now? Note that you could enter sc.exe -? to see the syntax and help for the cmd shell's SC command.
You would be seeing an error message if you were not using an elevated shell (AKA running with Administrator authority). You didn't show us the PowerShell window's title so it is possible that what you did show us is someone using a user level PowerShell
command line which had only reached the %windir%\System32 directory manually (instead of by getting that by starting a shell via right-click Run as Administrator, for example).
I see now that you are saying you are getting "Access denied". The most likely reason is that you are not using an elevated shell. However, it is also possible that you are being explicitly inhibited from using the sc.exe config command. See what you
get from sc.exe qc trustedinstaller instead. That is just a query and would not require the authority to issue any changes; apparently it could even be done by a normal user, who knew? At least it would verify if you could use the sc.exe
command.
FYI
Robert
Thanks. The query worked so I am not being blocked from the SC command. This is what I got back
[SC] QueryServiceConfig SUCCESS
SERVICE_NAME: trustedinstaller
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\WINDOWS\servicing\TrustedInstaller.exe
LOAD_ORDER_GROUP : ProfSvc_Group
TAG : 0
DISPLAY_NAME : Windows Modules Installer
DEPENDENCIES :
SERVICE_START_NAME : localSystem
I assume that this means that Auto start is already on.