question

ManishChawda-0385 avatar image
0 Votes"
ManishChawda-0385 asked M4-2126 commented

Test-Connection google.com -count 10 -AsJob

Hi,

When I am executing the following command, the -As job is not working in Powershell Core 7.0

Similarly Get-Job | Receive-Job also does not respond.


Test-Connection google.com -count 10 -AsJob

Kindly advise

Manish

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
1 Vote"
IanXue-MSFT answered M4-2126 commented

Hi,

The -AsJob parameter is not available for the Test-Connection cmdelt in PowerShell Core 7. You can create a background job using Start-Job.

 Start-Job -Name job1 -ScriptBlock {Test-Connection google.com -Count 10}

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How to get the result as to what was the TTL etc..
Because If I run get-job it shows me details but nothing w.r.t succeeded, what ttl it was etc...

0 Votes 0 ·

Can anyone help me with the query?

0 Votes 0 ·