31 lines
1.2 KiB
PowerShell
31 lines
1.2 KiB
PowerShell
Write-Output "=== drives ==="
|
|
Get-PSDrive -PSProvider FileSystem | Format-Table Name, Root -AutoSize
|
|
Write-Output "=== volumes ==="
|
|
Get-Volume | Where-Object { $_.DriveLetter } | Select-Object DriveLetter, FileSystemLabel, @{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,1)}}, @{n='SizeGB';e={[math]::Round($_.Size/1GB,1)}} | Format-Table -AutoSize
|
|
Write-Output "=== paths ==="
|
|
@(
|
|
'E:\wwwroot',
|
|
'D:\wwwroot',
|
|
'C:\ytd-test',
|
|
'C:\yutongda',
|
|
'C:\nginx-1.18.0\myconf\ai.conf'
|
|
) | ForEach-Object {
|
|
"$_ exists=$(Test-Path $_)"
|
|
}
|
|
Write-Output "=== ytd-test tree ==="
|
|
if (Test-Path 'C:\ytd-test') {
|
|
Get-ChildItem 'C:\ytd-test' | Select-Object Name, Mode
|
|
if (Test-Path 'C:\ytd-test\ops\active-release.json') {
|
|
Get-Content 'C:\ytd-test\ops\active-release.json' -Raw
|
|
}
|
|
}
|
|
Write-Output "=== nginx root line ==="
|
|
if (Test-Path 'C:\nginx-1.18.0\myconf\ai.conf') {
|
|
Select-String -Path 'C:\nginx-1.18.0\myconf\ai.conf' -Pattern 'root |8910|8180|ytd-test|wwwroot'
|
|
}
|
|
Write-Output "=== listen ports ==="
|
|
foreach ($p in 8910,8180,8913,8080,8810) {
|
|
$c = Get-NetTCPConnection -LocalPort $p -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
if ($c) { "$p LISTEN pid=$($c.OwningProcess)" } else { "$p down" }
|
|
}
|