When I run
Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber
it works for both local and remote hosts.
W
If you've tried some of the suggestions in the other answers, most notably:
Windows Management Instrumentation (WMI) inbound firewall rule is enabled Then consider other common reasons for getting this error: