While executing the following script on server1:
powershell.exe invoke-command -computerName server2 -scriptblock{cmd.exe "/c d:\scripts\start_SXXX_S012.bat"}
we'll get the following error (on server1), but only if no user is logged on at the server server2:
The shell cannot be started. A failure occurred during initialization: Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB))
The invoke-command
(and the following work on server ssql012) runs well, if anybody is logged on on server2. server1 is a WinServer 2012R2, server2 a WinServer 2012.
Any ideas on how to fix the problem?
User contributions licensed under CC BY-SA 3.0