# Getting started ## Sample event scripts powerEvents installs some sample event scripts to display some of the capabilities of the product in common scenarios.\ One of the samples, [*Sample.ValidateProperties*]() is intended to show how custom code can be executed on Vault lifecycle state transitions. The sample event scripts are customizable and can be used as a template to easily create custom scripts to fit specific customer requirements. ## Activating a sample script Sample event scripts are disabled by default.\ In order to enable the script *C:\\ProgramData\\coolOrange\\powerEvents\\Events\\Disabled\\Sample.ValidateProperties.ps1*, **move it** to the directory *C:\\ProgramData\\coolOrange\\powerEvents\\Events*: ```{image} /img/enable_event_script_sampleValidateProperties.png :width: 500px ``` ## Testing the script The goal of the **Sample.ValidateProperties** script is to prevent a user from releasing a file that has recently been changed by an other user.\ Testing this sample event script requires **two different Vault accounts**. Start the Vault Client and log in with the first account (in this example "Administrator" is used).\ Navigate to a file and change the lifecycle state to a non-release state.\ In this example the state of **Intake Casing.ipt** is changed to **"For Review"**: ```{image} /img/getting_started_smpleValidateProperties_changestate.png ``` **Changing Vault account**\ Log out by going to "File" -> "Log Out" and log in again with the **second** Vault account. **Releasing file**\ Navigate back to previously changed file and try to change its lifecycle state to a released state. In this example the state of **Intake Casing.ipt** is changed to **"Released"**: ```{image} /img/getting_started_smpleValidateProperties_release.png ``` **Result**\ The lifecycle transition for **Intake Casing.ipt** to the **"Released"** state is blocked by a powerEvents restriction\ because the latest modification was performed by a different Vault account ("Administrator" in this example) and the second Vault account is now trying to release the file: ```{image} /img/getting_started_smpleValidateProperties_restriction.png ```