Pingstatus
Author: s | 2025-04-24
Case PingStatus = Status code - Option Too Big Case PingStatus = Status code - Bad Destination Case PingStatus = Status code - Negotiating IPSEC Case PingStatus = Status code - General Failure Case Else PingStatus = Status code objPing.StatusCode - Unable to determine cause of if response == 0: pingstatus = Network Active else: pingstatus = Network Error And here is how I display pingstatus: label = font_status.render( %s % pingstatus, 1, (0,0,0)) So what I am looking for is how to return pingstatus from the function. Any help would be greatly appreciated.
PingStatus for Windows - download.seask.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters Function Get-WinSrvFromInv { The purpose of this function is to retrieve the list of servers for which you want to check the Windows Activation status. Write your piece of code to retirve the servers from your inventory. for example, Get-Content -Path $InvPath\Server.txt #> return @("Srv2K19", "Srv2K16", "Srv2K12") } Function Get-WindowsActivation { This is a PowerShell advanced function to rerieve the Windows Activation Status using CIM classes. It takes one or more servers as an input, and it accepts through pipeline as well This script will check the connectivity, and then checks the activation status It collects the infor from all the servers and then return the value of error at once. #> [CmdLetBinding()] Param ( [Parameter(Mandatory=$true,ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string[]] $ComputerName ) Begin { $ActivationStatus = @() } Process { foreach ($CN in $ComputerName) { $PingStatus = Test-Connection -ComputerName $CN -ErrorAction Stop -Count 1 -Quiet $SPL = Get-CimInstance -ClassName SoftwareLicensingProduct -ComputerName $CN -Filter "PartialProductKey IS NOT NULL" -ErrorAction Stop $WinProduct = $SPL | Where-Object Name -like "Windows*" $Status = if ($WinProduct.LicenseStatus -eq 1) { "Activated" } else { "Not Activated" } if ($PingStatus -ne $true) { $PingStatus = "No" $Status = "Error" } else { $PingStatus = "Yes" } $ActivationStatus += New-Object -TypeName psobject -Property @{ ComputerName = $CN Status = $Status IsPinging
Download PingStatus 3.4.2 for Windows
Download PingStatus for Mac - MacUpdate
. Case PingStatus = Status code - Option Too Big Case PingStatus = Status code - Bad Destination Case PingStatus = Status code - Negotiating IPSEC Case PingStatus = Status code - General Failure Case Else PingStatus = Status code objPing.StatusCode - Unable to determine cause ofOlder versions of PingStatus (Windows)
PingStatus on the Mac App Store
Download free PingStatus - FreeDownloadManager.org
. Case PingStatus = Status code - Option Too Big Case PingStatus = Status code - Bad Destination Case PingStatus = Status code - Negotiating IPSEC Case PingStatus = Status code - General Failure Case Else PingStatus = Status code objPing.StatusCode - Unable to determine cause ofComments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters Function Get-WinSrvFromInv { The purpose of this function is to retrieve the list of servers for which you want to check the Windows Activation status. Write your piece of code to retirve the servers from your inventory. for example, Get-Content -Path $InvPath\Server.txt #> return @("Srv2K19", "Srv2K16", "Srv2K12") } Function Get-WindowsActivation { This is a PowerShell advanced function to rerieve the Windows Activation Status using CIM classes. It takes one or more servers as an input, and it accepts through pipeline as well This script will check the connectivity, and then checks the activation status It collects the infor from all the servers and then return the value of error at once. #> [CmdLetBinding()] Param ( [Parameter(Mandatory=$true,ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string[]] $ComputerName ) Begin { $ActivationStatus = @() } Process { foreach ($CN in $ComputerName) { $PingStatus = Test-Connection -ComputerName $CN -ErrorAction Stop -Count 1 -Quiet $SPL = Get-CimInstance -ClassName SoftwareLicensingProduct -ComputerName $CN -Filter "PartialProductKey IS NOT NULL" -ErrorAction Stop $WinProduct = $SPL | Where-Object Name -like "Windows*" $Status = if ($WinProduct.LicenseStatus -eq 1) { "Activated" } else { "Not Activated" } if ($PingStatus -ne $true) { $PingStatus = "No" $Status = "Error" } else { $PingStatus = "Yes" } $ActivationStatus += New-Object -TypeName psobject -Property @{ ComputerName = $CN Status = $Status IsPinging
2025-04-01