You can add the PowerCLI core snapin to a PowerShell session with:
Add-PSSnapin-NameVMware.VimAutomation.Core
After that you need to connect to a vCenter server with:
Connect-VIServer-ServerYourvCenterName
Replace YourvCenterName with the name of your vCenter server.
If you put the above two PowerShell lines at the beginning of the script it should work.