23 lines
639 B
PowerShell
23 lines
639 B
PowerShell
#
|
|
# UAConnectivityCheck.ps1
|
|
#
|
|
|
|
$scriptLabel = "UAConnectivityCheck"
|
|
$dateStringPrefix = Get-Date -Format "yyyy-MM-dd_HHmm__"
|
|
$outDir = Join-Path -Path $env:Temp -ChildPath $scriptLabel
|
|
if (-not (Test-Path -Path $outDir)) {
|
|
New-Item -Path $env:Temp -Name $scriptLabel -ItemType "directory"
|
|
}
|
|
$outFileName = Join-Path -Path $outDir -ChildPath "$($dateStringPrefix)$($scriptLabel).log"
|
|
$ErrorActionPreference="SilentlyContinue"
|
|
Stop-Transcript | out-null
|
|
$ErrorActionPreference = "Continue"
|
|
Start-Transcript -path $outFileName
|
|
|
|
& ".\NameResolutionCheck.ps1"
|
|
& ".\HostsFileCheck.ps1"
|
|
& ".\TcpCheck.ps1"
|
|
& ".\UdpCheck.ps1"
|
|
|
|
Stop-Transcript
|