Jump to content

Powershell - Running 2 scripts at the same time


Recommended Posts

Posted

Hi All

 

I am having an issue with running a Powershell script with a countdown timer. both of the scripts work individually, but i cannot get them to run at the same time. I have tried creating a bat file calling each script but the 2nd one does not start until the 1st one has completed.

 

Can anyone advise?

 

 

Thanks Everyone

 

Darren

Posted

code for a simple time below:


$Time = 15*60
$length = $Time / 100
while($Time -gt 0) {
$min = [int](([string]($Time/60)).split('.')[0])
$text = " " + $min + " minutes " + ($Time % 60) + " seconds left"
Write-Progress "Pausing Script" -status $text -perc ($Time/$length)
start-sleep -s 1
$Time --
}

Posted

Thanks HPlum78

 

I am trying to run a start-process "odopen command. Whilst that is running i would like a countdown timer to be visible , Say a 20 second countdown.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...