The test whether powershell remoting is enabled or not can be done using:

  1. Check if winrm service is running: Get-Service winrm.
  2. Check if endpoint is setup: Invoke-WsManAction -Action analyze -ResourceURI winrm/config/service
  3. Check if PS Plugin is registered: dir WSMan:\localhost\Plugin\microsoft.powershell

If any of the test fails, you need to run Enable-PSRemoting to enable remoting.