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 :/