header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Why does get-wmiobject win32_pingstatus return not supported?
Last Post 09 Apr 2008 09:18 PM by kscriss. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
bmgonavyUser is Offline
New Member
New Member
Posts:1

--
09 Apr 2008 07:03 PM  

I am on an XP box.  I can ping using the normal ping command and from powershell

gwmi -Query "SELECT * FROM Win32_PingStatus WHERE Address='127.0.0.1'"

returns with no errors.

any thoughts?

kscrissUser is Offline
Basic Member
Basic Member
Posts:119

--
09 Apr 2008 09:18 PM  

Hope this isn't a double post. Not sure if I understood your question. Howerver, I ran your method and it ran clean with no errors. Here is another way.

$srv='127.0.0.1'
$PingResults=Get-WmiObject win32_pingstatus -f "address='$srv'"
$PingResults
"Ping Status Completion Code "+$PingResults.StatusCode | out-host
$srv='BogusAddress.MyDomain.Com'
$PingResults=Get-WmiObject win32_pingstatus -f "address='$srv'"
$PingResults
"Ping Status Completion Code "+$PingResults.StatusCode | out-host


The second to BogusAddress.MyDomain.Com ping actually produces an erorr for me.

You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer