DEV/CONSOLE

[PowerShell] mirrorHA Active Standby 확인

SBP 2023. 12. 11. 11:00

Active 된 서버만 Virtual IP 조회 가능
Active : Virtual IP "IP"
Stand by : Virtual IP NULL

if ( (Get-NetIpAddress - AddressFamily IPv4 -InterfaceAlias Service).IPAddress -match "IP" ){
     active
}else {
    stand by
}