Posts

Showing posts with the label Ping

Active Directory Enterprise CA

In many cases I work with clients that use their own Certification Authority to issue certificates for their services, like Microsoft Exchange, Microsft Lync, IIS websites etc. In order for me to issue a certificate I obviously have to know where I can find the CA server... I use the following command:  certutil -config - -ping  in order to find the CA. If there is a CA with in your network a popup box will appear asking which CA to ping. You then should be able to get the server name from the output that follows on the command prompt.

PowerShell Ping Function

You can use the following boolean function to ping a host using powershell: function Ping-Host {param( [string]$HostName, [int32]$Requests = 3) for ($i = 1; $i -le $Requests; $i++) { $Result = Get-WmiObject -Class Win32_PingStatus -ComputerName . -Filter "Address='$HostName'" Start-Sleep -Seconds 1 if ($Result.StatusCode -ne 0) {return $FALSE} } return $TRUE }