How to multiple session on local host for multiple scripst

Welcome Forums General PowerShell Q&A How to multiple session on local host for multiple scripst

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
1 week, 2 days ago.

  • Author
    Posts
  • #113674

    Participant
    Points: 0
    Rank: Member

    Hi Team,

    I have a requirement where have to run multiple commands at a time and each command should use separate PowerShell session.

    For example, I have 100 commands in a text file, the PowerShell should read the content of the text file and run all commands parallel.  If we run normally, the commands are running sequential, the second line will run only after completing the first line. In my environment, each command is taking more than 2 days. If we run all commands parallel then the script will complete within 3 days.

    The scripts look like below

    C:\ASC_Tools\emcopy64.exe "C:\Test\Source\text1" "C:\Test\Dest\text" /s /sdd /de /r:3 /w:3 /c /nosec /cm md5 /th 3 /f /tee /log+:"C:\test\test.log"
    C:\ASC_Tools\emcopy64.exe "C:\Test\Source\text2" "C:\Test\Dest\text2" /s /sdd /de /r:3 /w:3 /c /nosec /cm md5 /th 3 /f /tee /log+:"C:\test\test1.log"

     

    Could you please help me with this.

     

     

  • #113737

    Participant
    Points: 20
    Rank: Member

You must be logged in to reply to this topic.