I'll try to describe with detail, as much as allowed.
We have Act_OnSrv.ps1 script on the Server1. The Act_OnSrv.ps1 could NOT be copied to a client machine and executed as
it uses a lot of PS modules and dependencies and must be executed only on Server1. So pls consider it as a rule "the Act_OnSrv.ps1
must be executed on the server".
Act_OnSrv.ps1 script waits for computer name as input .
My task is:
Execute below PS commands on client machine under domain account instead of system account.
$Session = New-PSSession -ComputerName Server1
Invoke-Command -Session $session -ScriptBlock {C:\_Script\Act_OnSrv.ps1}
Note: Access to the server is restricted only for one user, domain\user1.
if above described is note making a sense please don't hesitate to contact me.