Add a quiet parameter to Test-WSMan in order to returns a Boolean value
See original GitHub issueSummary of the new feature/enhancement
Just like Test-Connection , add a quiet parameter to Test-WSMan in order to returns a Boolean value In some computer, WSMan is not enable by default. And sometimes I need to collect a list of computer with WSMan enabled via an if statement as bellow:
$ship | foreach -Parallel {if (Test-Connection -ComputerName $_ -Quiet -Count 2 -Delay 1) {$_}} -ThrottleLimit 10 | tee -Path .\2online.txt
Proposed technical implementation details (optional)
$ship | foreach -Parallel {if (Test-WSMan -ComputerName $_ -Quiet) {$_}} -ThrottleLimit 10 | tee -Path .\2online.txt
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Friday Fun: A Better Test-WsMan
I added a parameter called -Quiet so that the command behaves like Test-Connection.
Read more >Test-WSMan - PowerShell
This command tests to see whether the WS-Management (WinRM) service is running on the local computer by using the authentication parameter. Using the ......
Read more >Powershell if true or false. I use this script to import the csv f
Thus, you will usually want to add the - Prompt parameter: Update on placement ... Returns a Boolean value (true or false), instead...
Read more >How does PowerShell Ping Works with Examples?
-Quiet parameter suppress the output that the Test-Connection command generates and returns the output in the Boolean form.
Read more >Test-Connection Return Value - powershell
So Test-Connection with the -quiet switch can return a boolean. Now I need to somehow test to see whether that is True or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The Working Group has reviewed this and agrees there is a need for a
-Quiet
parameter to return a boolean value. While there is some debate about whetherQuiet
is the appropriate parameter name, there is precedent withTest-Connection
andSelect-String
. This issue will be marked asUp for Grabs
.Absolutely agree we need a
-Quiet
parameter to stay in line with other test commands.