0

I have a Powershell Script (PS1), which gets Events from a Remote Computer. When there is a special Event, it (PS1) should start a Powershell Script (PS2) which is on the remote Computer. The 2nd Script gets 2 Parameter from the first and the first should not wait for the 2nd (it will copy some files with robocopy and this will need some time)

PS1:

icm -ComputerName $Computer {param ($source, $location) 'G:\RoboCopyScript_271113.ps1'} -ArgumentList $source, $location -Credential $credWinLog

PS2: param ( [Parameter(Position=0)]$source, [Parameter(Position=1)]$location )

Someone knows how i make the PS2... something like a Child Process? and where my Errors ware with the Parameters, i tried so much :/

  • Your options for starting the process on the remote machine will depend on the capabilities of the remote system. Does it have Powershell remoting enabled, and what version of PS is it running? If that script is going to copy files from another system, you may run into "second hop" authentication issues and need to be configured for and use CredSSP authentication do delegate credentials for the robocopy. – mjolinor Nov 28 '13 at 13:06
  • Thank you mjolinor for CredSPP, Robocopy is able to copy now :-) – user3044977 Nov 29 '13 at 12:26

0 Answers0