Use ansible adhoc command with vmware

I am new to Ansible, is it possible to use the adhoc command with ansible module (vmware.vmware_rest.*) ?

I am trying to run a simple comma to get virtual machine info.

ansible -m vmware.vmware_rest.vcenter_vm_info -a “vcenter_hostname=vcenter-ip vcenter_username=username vcenter_password=password”

Looks like this is failing because its missing the the pattern/hosts.

Also, using the ipaddress/hostname for the vcenter does not work.

ansible vcenter-ip -m vmware.vmware_rest.vcenter_vm_info -a “vcenter_hostname=vcenter-ip vcenter_username=username vcenter_password=password”

and that vcenter ip is already in the inventory file.

Please help

What is the error you get when you run ad-hoc command?