Hi Team,
Below are the few lines of my script, Could any one tell me how to export the If-condition test result of this script to a csv file
$Servers= import-csv "C:\testcounter.csv"
$MasterArray = @()
ForEach($Server in $Servers)
{
$ObjectName=$Server.ObjectName
$CounterName=$Server.CounterName
$InstanceName=$Server.InstanceName
$Server=$Server.Server
If(Test-Connection -quiet -computer $server)
{
$Result=Get-Counter -Counter "\\$server\$ObjectName($InstanceName)\$CounterName"
}