VMware PowerCLI 13.3
The PowerShell execution policy is restricting scripts from running on your system, which is preventing the module from being loaded. To resolve this, you'll need to change the execution policy to allow scripts to run.
To Check Current Execution Policy:
Run this command to see the current execution policy: # Get-ExecutionPolicy
If it returns something like "Restricted", you'll need to change it.
To Change the Current Execution Policy:
Run the command : # Set-ExecutionPolicy -ExecutionPolicy AllSigned
You can also use the Set-ExecutionPolicy RemoteSigned
command which will apply to all PowerShell sessions on your system unless you specify a scope. By default, the change applies globally (to all users), but you can limit the scope of the change if you want it to apply only to the current session or just for the current user.
This affects all users on the system and all PowerShell sessions.
This change will last only for the current PowerShell session and will be reset when you close PowerShell.
This will allow scripts to run only for the current user and will persist across sessions but not affect other users on the system.
If you want the change to be permanent and apply to all future sessions, you don’t need to specify a scope—just using Set-ExecutionPolicy RemoteSigned
will work.
Reference Document: PowerShell Execution Policy