Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

test-connection vs win32_pingstatus

$
0
0

Hi, I have  little question to Richard Siddaway's book,  if I may:) .

In "powershell and WMI",  in section "best practise" Richard has written like this:

"Use Test-Connection -ComputerName $computer -Count 1 to test the availability of a remote machine before using WMI."

 

In powershell v5,  test-connection or win32_pingstatus are members of the same class

TypeName: System.Management.ManagementObject#root\cimv2\Win32_PingStatus

 

..so ..or I can understand this paragraphe(test-connection and another class like win32_diskdrive or win32_pingstatus are members of System.Management.ManagementObject#root\cimv2\*) or it was difference in previous powershell version (v3,v2)?  
Why use test-connection before wmi technology sice are members of the same namespaces? 


Viewing all articles
Browse latest Browse all 6937

Trending Articles