Hello Fellow Thwackers,
I'm trying to get this Powershell script shown as the status of the monitoring component. I've add this script in the edit:
$username = "username"
$password = ConvertTo-SecureString "password" -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
$web = Invoke-WebRequest dwtest-web01:8080/.../html -Credential $cred
$data = $web.AllElements | Where{$_.TagName -eq "TD"} | Select-Object -Expand InnerText
for($i=0; $i -le $data.Length;$i+=1){
If ($data[$i] -eq 'false'){
Write-Host $data[$i-3] "instance status is" $data[$i] | out-String;
$i+=1
}
}
I'm not familiar with having the credentials coming from SW itself but I do have it set up.
I've pasted the same code but the result was "Not Defined"
Could anyone help me figure this out?
Thanks