Viewing 4 posts - 61 through 64 (of 64 total)
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...
October 25, 2011 at 9:35 am
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...
October 6, 2011 at 2:54 pm
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...
September 30, 2011 at 11:21 am
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...
July 14, 2011 at 10:54 am
Viewing 4 posts - 61 through 64 (of 64 total)