Get-WinRMstatus.ps1

Function Get-WinRMStatus {
    if (!([bool](Test-WSMan -ComputerName $env:COMPUTERNAME -ErrorAction SilentlyContinue))){
         return "WinRM Not Enabled, Try Running Enable-WinRM"
        }
    elseif ((Get-Service -Name "WinRM" | Where-Object {$_.Status -eq "Running"}) -and (Test-Path -Path WSMan:\Localhost\listener\listener*)){
        return "WinRM Enabled, if you need to disable run Disable-WinRM"
        }
     }