Set-ExecutionPolicy : Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell’ is denied.

When running VMware PowerShell CLI you receive this error:

Set-ExecutionPolicy : Access to the registry key ‘HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1ShellIdsMicrosoft.PowerShell’ is denied.

Right click powercli and click: “Run As Administrator”

Once powershell starts type this command:

Set-ExecutionPolicy RemoteSigned

VMware Virtual Machine Hosting

VMWare convert thick to thin disk

If you have VMware vCenter – Click Migrate

For those of us who do not have VMware vCenter:

1. Shutdown the VM
2. SSH to the ESXi machine and type:

vmkfstools -i /vmfs/volumes/datastore1/NAME-OF-VM/NAME-OF-VM.vmdk /vmfs/volumes/datastore1/NAME-OF-VM/NAME-OF-VM-thin.vmdk -d ‘thin’ -a lsilogic

Once the copy is done, go into the settings of your VM, delete the hard disk, and add a new hard disk pointing to the “thin” vmdk you created. Boot your vm, if it all works then you can use the datastore browser to delete the thick vmdk and you are done.

VMware Virtual Machine Hosting