There are several vCenters alarm and script will change as per the alarm you would like to configure.
Below is the VMware blog on how to get started with managing alarms using PowerCLI.
Let me know if you need more help on this.
Unfortunately the PowerCLI cmdlets do not offer the possibility to create new alarms.
For that you will have revert to using the API methods.
You'll find example scripts in my Alarm series.
There are some other good documents on creating alarms.
See for example the somewhat older but quite good vSphere alarm triggers