forked from JeffHarkavy/SafeguardCmdletTesting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmdlet-tests-network-diagnostics.ps1
More file actions
57 lines (50 loc) · 2.05 KB
/
cmdlet-tests-network-diagnostics.ps1
File metadata and controls
57 lines (50 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
try {
Get-Command "writeCallHeader" -ErrorAction Stop > $null
} catch {
write-host "Not meant to be run as a standalone script" -ForegroundColor Red
exit
}
$TestBlockName ="Running Networking Diagnostics Tests"
$blockInfo = testBlockHeader $TestBlockName
# ===== Covered Commands =====
# Invoke-SafeguardClusterPing
# Invoke-SafeguardClusterThroughput
# Invoke-SafeguardMemberPing
# Invoke-SafeguardMemberThroughput
# Invoke-SafeguardPing
# Invoke-SafeguardSessionsPing
# Invoke-SafeguardSessionsTelnet
# Invoke-SafeguardTelnet
#
# TODO - stubbed code
# Some of these need a cluster or SPS - don't have one right now
try {
#writeCallHeader "Invoke-SafeguardClusterPing"
#Invoke-SafeguardClusterPing
#goodResult "Invoke-SafeguardClusterPing" "Success"
writeCallHeader "Invoke-SafeguardClusterThroughput"
Invoke-SafeguardClusterThroughput -Megabytes 1
goodResult "Invoke-SafeguardClusterThroughput" "Success"
#writeCallHeader "Invoke-SafeguardMemberPing"
#Invoke-SafeguardMemberPing
#goodResult "Invoke-SafeguardMemberPing" "Success"
#writeCallHeader "Invoke-SafeguardMemberThroughput"
#Invoke-SafeguardMemberThroughput
#goodResult "Invoke-SafeguardMemberThroughput" "Success"
writeCallHeader "Invoke-SafeguardPing"
Invoke-SafeguardPing -NetworkAddress $($DATA.realArchiveServer.NetworkAddress)
goodResult "Invoke-SafeguardPing" "Success"
#writeCallHeader "Invoke-SafeguardSessionsPing"
#Invoke-SafeguardSessionsPing
#goodResult "Invoke-SafeguardSessionsPing" "Success"
#writeCallHeader "Invoke-SafeguardSessionsTelnet"
#Invoke-SafeguardSessionsTelnet
#goodResult "Invoke-SafeguardSessionsTelnet" "Success"
writeCallHeader "Invoke-SafeguardTelnet"
Invoke-SafeguardTelnet -NetworkAddress $($DATA.realArchiveServer.NetworkAddress) -Port 22
goodResult "Invoke-SafeguardTelnet" "Success"
}
catch {
badResult "Network Diagnostics general" "Unexpected error testing network diagnostic commands - $_.Message"
}
testBlockHeader $TestBlockName $blockInfo