Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 197835

Re: Running a powercli from powershell

$
0
0

The first PowerShell is launched by using powershell.exe xxxx.ps1

It passes the name it reads from a file to the second PowerShell script – as evidenced by echo in the second script.

But as soon as the second (called) script runs ADD-PSSnapin…it fails:

 

#Load PowerCLI module in PowerShell

Add-PSSnapin VMware.VimAutomation.Core


Viewing all articles
Browse latest Browse all 197835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>