You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verified this is not an issues in the underlying windows container that should be reported to Windows Feedback Hub
Steps to reproduce
I'm trying to run the following script - which will show me the fastest way my network status (ping, TTL, DNS)
The script is attached here: $segment = "192.168.0" 1..254 |%{Test-Connection -Count 1 -ComputerName "$segment.$_" -AsJob} $Results=Get-Job | Receive-Job -Wait | select @{N="IP";E={$_.Address}},@{N="ping";E={[bool]$_.ResponseTimeToLive}},@{N="TTL";E={$_.ResponseTimeToLive}},@{N="DNS";E={[System.Net.Dns]::GetHostByAddress($_.Address).Hostname}}
``
Of course I will use the Test-Connection command with the quick option -AsJob
It doesn't work because this Powershell version doesn't have -AsJob as you can see in the image:
Why? Is there an option to run regular Powershell on Docker?
Instead, I ended up doing everything with Start-Job
But it comes out significantly slow. Instead within a second - within a minute
Would appreciate help!
The Test-Connection cmdlet sends Internet Control Message Protocol (ICMP) echo request packets, or pings, to one or more remote computers and returns the echo response replies. You can use this cmdlet to determine whether a particular computer can be contacted across an IP network. You can use the parameters of Test-Connection to specify both the sending and receiving computers, to run the command as a background job, to set a time-out and number of pings, and to configure the connection and authentication. Unlike the familiar ping command, Test-Connection returns a TestConnectionCommand+PingStatus object that you can investigate in PowerShell. The Quiet parameter returns a Boolean value in a System.Boolean object for each tested connection. If multiple connections are tested, an array of Boolean values is returned.
Prerequisites
Steps to reproduce
I'm trying to run the following script - which will show me the fastest way my network status (ping, TTL, DNS)
The script is attached here:
$segment = "192.168.0"
1..254 |%{Test-Connection -Count 1 -ComputerName "$segment.$_" -AsJob}
$Results=Get-Job | Receive-Job -Wait | select @{N="IP";E={$_.Address}},@{N="ping";E={[bool]$_.ResponseTimeToLive}},@{N="TTL";E={$_.ResponseTimeToLive}},@{N="DNS";E={[System.Net.Dns]::GetHostByAddress($_.Address).Hostname}}
``
Of course I will use the Test-Connection command with the quick option -AsJob
It doesn't work because this Powershell version doesn't have -AsJob as you can see in the image:
Why? Is there an option to run regular Powershell on Docker?
Instead, I ended up doing everything with Start-Job
But it comes out significantly slow. Instead within a second - within a minute
Would appreciate help!
Expected behavior
Actual behavior
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: