Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

How do you run this?

$
0
0

The concept of this script looks intriguing but I am at a loss as to how to execute it.

I have PowerShell open.
I have the PowerCLI module loaded.
I have saved your script as Find-VM.PS1.
I have a list of 4 of our vCenter names saved to a text file called vCenters.txt

The answer is probably obvious but I still need to ask.
So for example from the POSH console I thought this would work but it does not:
./Find-VM.ps1 -Name my-vm
Or this:
Get-Content C:\SCRIPTS\PowerCLI\vCenters.txt | Find-VM
No errors, just no output.
The last example (taken from the examples in the script itself) seems to suggest that Find-VM is a CMDLET but no such CMDLET exists in the PowerCLI module I've imported. (Stuff like Get-FolderPath does, so I know I've got that module installed.)

I'm missing some simple concept here - can you clue me in? -thanks



Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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