Forum Replies Created

Viewing 4 posts - 61 through 64 (of 64 total)

  • RE: Powershell Question

    Worked for me as you had it.

    Try

    { Write-Host "Statement 1"

    Write-Host "Statement 2"

    writ-host "Statement 3 Error"

    Write-Host "Statement 4"

    }

    Catch

    { Write-Host "In first catch" }

    Try

    { Write-Host...

  • RE: finding offline disks using Get-WmiObject

    Doesn't look like you're doing anything wrong to me. Running

    Get-WmiObject -Class Win32_Volume |fl *

    Shows everything available from that class but Availability is Blank.

    It's also blank for the Win32_LogicalDisk...

  • RE: Determining if a server is clustered or stand-alone

    Another option is to look for the cluster service

    $s = Get-WmiObject -Class Win32_SystemServices -ComputerName $server

    if ($s | select PartComponent | where {$_ -like "*ClusSvc*"}) { Write-Output "$server is Clustered" }

    else...

  • RE: Alert when long running queries are running

    You could create a job to run every so often to check the total_elapsed_time in sys.dm_exec_requests and send an email if a long running process is found. Something like

    IF...

Viewing 4 posts - 61 through 64 (of 64 total)