Files
claudetools/.neptune-winrm-probe.ps1
Howard Enos 0e244a610f sync: auto-sync from HOWARD-HOME at 2026-07-15 12:21:30
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-15 12:21:30
2026-07-15 12:22:01 -07:00

20 lines
974 B
PowerShell

$ErrorActionPreference = 'Continue'
Write-Output '=== WinRM service ==='
Get-Service WinRM | Select-Object Name, Status, StartType | Format-Table -AutoSize
Write-Output '=== Test-WSMan localhost ==='
try { Test-WSMan -ComputerName neptune -ErrorAction Stop | Out-String } catch { Write-Output "FAIL: $($_.Exception.Message)" }
Write-Output '=== WinRM listeners ==='
winrm enumerate winrm/config/listener 2>&1
Write-Output '=== Exchange PowerShell vdir session test ==='
try {
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://neptune/PowerShell/ -Authentication Kerberos -ErrorAction Stop
Write-Output "SESSION OK: $($s.State)"
Remove-PSSession $s
} catch { Write-Output "FAIL: $($_.Exception.Message)" }
Write-Output '=== plain PSSession test ==='
try {
$s2 = New-PSSession -ComputerName neptune -ErrorAction Stop
Write-Output "SESSION OK: $($s2.State)"
Remove-PSSession $s2
} catch { Write-Output "FAIL: $($_.Exception.Message)" }