Files
murano-tests/modified_workflow/DeployTesting.ps1
Anastasia Kuznetsova 0f174539ff Added modified_workflow
Change-Id: If3b6b96a6a0e56e345d7db092982d163bb8d0b39
2013-11-02 12:55:23 -05:00

43 lines
1020 B
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Function DeployTestingFunction {
$stream = [System.IO.StreamWriter] "C:/test_report.txt"
$stream.WriteLine(Test Report)
$host_name = [System.Net.Dns]::GetHostByName((hostname)).HostName
$stream.WriteLine(Host: $host_name)
$ip_address = [System.Net.Dns]::GetHostByName((hostname)).AddressList.IPAddressToString
$stream.WriteLine(IP Address: $ip_address)
$win_agent = Get-Process WindowsAgent | Select-Object name,fileversion,productversion,company
if ($win_agent) { $agent_status = running } else { $agent_status = error }
$stream.WriteLine(Murano Windows Agent Process Status: $agent_status)
if ($win_agent) { $agent_version = $win_agent.FileVersion
$stream.WriteLine(Murano Windows Agent Version: $agent_version) }
$stream.WriteLine(Firewall Opened Ports:)
$firewall_rules = Get-NetFirewallPortFilter | Select-Object Protocol, RemotePort, LocalPort
foreach ($rule in $firewall_rules) { $stream.WriteLine($rule) }
$stream.close()
}