As a System Administrator, you can reduce sometimes a considerably amount of time by running PowerShell scripts across your Windows Systems. Most of the scripts that you find online will not run if you haven’t configured previously PowerShell, and will throw you an unpleasant error in red fonts.
My Windows is in German, so the error could look even scarier.

As you can see, my problem is with VMWare vSphere PowerCLI script. I don’t want to make a long post and explain every execution mode of the PowerShell. For more info, please check here.
I will show directly how you can get rid of this error in this particular case. Open PowerShell as Administrator and run the command:

Set-ExecutionPolicy Unrestricted

After that restart VMWare vSphere PowerCLI script again and everything will be fine.

Now you can use the script and get your necessary information from vCenter. Enjoy!



Share:

Leave a Reply

Your email address will not be published.