Failed to run PowerCLI command

You may see the following errors.

an assertion failure has occurred

The ‘connect-viserver’ command was found in the module ‘VMware.VimAutomation.Core’, but the module could not be loaded. For more
information, run ‘Import-Module VMware.VimAutomation.Core’.

There are several possible reasons:

  • The files are Read-Only mode.
  • The files are Blocked moe.
  • GPO only allows execute signed PowerShell scripts.