Skip to content

Commit 2034c1f

Browse files
authored
Merge pull request #76 from tibmeister/Test-Connection-RFC
Test-Connection RFC
2 parents 53ff8a2 + 4b987ed commit 2034c1f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
RFC: RFC0022
3+
Author: Jody Whitlock
4+
Status: Draft
5+
Area: Commands
6+
Comments Due:
7+
---
8+
9+
# Get-TestConnection cmdlet for non-Windows Systems
10+
11+
Test-Connection, introduced in PowerShell 2.0 under the Microsoft.PowerShell.Management class provided a mechanism for sending ICMP echo requests within the PowerShell language and have the results returned as a PowerShell object that could be manipulated as such.
12+
13+
While it's true that Test-Connection has evolved very little over the years and versions of PowerShell, on only need to look at the legacy that this cmdlet builds on, the ping command. This simple command has mostly remained unchanged for as long as the ICMP protocol has existed. It's a very simplistic function that while simplistic fills a massive void in network troubleshooting and validation of communication capabilities.
14+
15+
## Motivation
16+
17+
The motivation for this RFC is as simple as the ping command itself; provide a Test-Connection cmdlet that can run on any platform that PowerShell can. This means stripping out some of the WSMan specific remoting capabilities that have been added to allow for distributed execution and removing WMI based methods and classes in favor of pure C# code.
18+
19+
This could also be back-ported into the Windows implementation, which while immediately removing the remoting capability would increase the performance of the cmdlet by not requiring WMI accessors and allow for tighter integration between multiple platforms that this cmdlet could run on.
20+
21+
It would also serve as a framework for further enhancement, such as using SSHRemoting to enable the distributed approach to performing a distributed ping, while allowing for some built in governor mechanism to prevent abuse of the distributed nature.
22+
23+
Lastly, and most importantly, while the current Test-Connection cmdlet in the Windows invocation of PowerShell is limited, it is used extensively to check for the existence and responsiveness of remote systems. By not providing a non-Windows specific implementation that is as close in parameter set and return types then existing code must be re-written to overcome this limitation, or adoption of PowerShell on non-Windows platforms may be barred by the lack of this simple but widely used functionality.
24+
25+
## Specification
26+
27+
## Alternate Proposals and Considerations
28+
29+
An alternate proposal is to not implement Test-Connection but rather build a new cmdlet from the ground up to replace Test-Connection entirely. This would be similar in impact to not implementing Test-Connection cross-platform by requiring an unknown amount of code changes to occur before adoption on non-Windows platforms can occur.
30+
31+
This may also lend to those that require this functionality to create seperate code-bases and modules to fill the gap, leading to many custom solutions and suffering from the lack of standards and community collaboration.

0 commit comments

Comments
 (0)